Menu

#4 C/C++ files - shouldn't count lines with //

open
nobody
None
5
2012-07-08
2012-07-08
Kevin Platt
No

If a line contains // preceded by whitespace, the tool counts the line as a line of code. But this is the start of a single-line C++ comment, so it shouldn't count as a line of code, at least not for C++ files (.cpp, .cc, .hpp, .hh). For C files (.c, .h), this type of comment isn't allowed, so it could go either way, but I would suggest excluding this lines in this case too.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.