4 ms·
I loved the punchline, & probably wouldn't have spotted that one myself. As others have noted, the moral is to not use C++ '//' style comments in C code or at
by 5hoom 15y ago
I loved the punchline, & probably wouldn't have spotted that one myself.
As others have noted, the moral is to not use C++ '//' style comments in C code or at least hope that you are using a clever editor ;)
- StavrosK 15y agoIt would have produced the same bug in C++ code as well.
- 5hoom 15y agoI guess it would, it's just not something I've run into. The only time I've ever seen backslash's used in C or C++ as a line-break is in huge multi line macros with lots of variables that has been broken up for readability. It never occurred to me it could be used to do multi line comments but there you are.