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

1 Answer 1


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.

  • it's supported as my compiler is gcc and i use std99
    – gpilotino
    Commented Jul 27, 2012 at 10:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .