Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there any way to have a shortcut / macro to put c++ (double slash) style comments in C sources ? I only menage to obtain c (no-block) comments ie.


which is somewhat umcomfortable

share|improve this question

This depends on your compiler and if 'strict' is applied.

C99 introduced several new features, (..) and support for one-line comments beginning with //, as in BCPL or C++. Many of these had already been implemented as extensions in several C compilers.

share|improve this answer
it's supported as my compiler is gcc and i use std99 – gpilotino Jul 27 '12 at 10:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.