Problem: When you want to comment out a bunch of code that spans multiple lines, you want to save the code but remove it right now. '//' comments take forever to do by hand. Cutting the code to the clipboard is dangerous. '/* */' comments work well enough but when you want to add the code back you have to remove comments in two places, and if you forget to remove one your code will not compile.
Solution:. When adding the ending C comment add it with a C++ comment at the beginning '//*/'. Then when you want to add the code back you can add a forward slash to the beginning comment and all the code will be added back.
//* or /* depending on if you want the code below
void buggy_code(const Something &important)
{
//...
}
//*/
Solution:. When adding the ending C comment add it with a C++ comment at the beginning '//*/'. Then when you want to add the code back you can add a forward slash to the beginning comment and all the code will be added back.
//* or /* depending on if you want the code below
void buggy_code(const Something &important)
{
//...
}
//*/
