Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
//comment is for a actual comments
/*comment*/ should only be used commenting out code
These are some unwritten rules
kamen64251yIf it's a whole line comment, //
If it's a multi-line comment or commenting out something in the middle of the line, /* */
P.S. I kind of hate how VSCode handles those; I need an extra extension just to automatically insert the proper one, and selecting a whole comment block requires an absurd amount of steps. WebStorm was perfect in that.
C0D4681651y# this is a comment
// this is another comment
; this is also a comment
/* this is another one */
/** ooh a bigger one **/
"" here's a good one
' fuck this is one too
Nope, I think that's all of them I've used this month so far.
Depends, if it's a doclet, legal text or commented block of code then the multi-line one (although for doclets it would be /** */).
For the rest //.
"// Comment" is C++ style, not C
C only really have "/* Comment */"
I find "/* */" generally cleaner and use "//" mostly to comment out lines or shit while coding