Nested Block Comment problem [message #984768] |
Wed, 14 November 2012 19:02  |
Eclipse User |
|
|
|
Quick question. I just started trying to edit some existing C++ code with Eclipse/CDT, and there are problems all over the place due to nested comment blocks. I've also noticed that if I highlight a few lines of code that already contain a comment and select 'add block comment' from the toolbar, a block comment is put around the selected lines but the internal comment loses it's /* */. And when I reselect the lines and select 'remove block comment' from the toolbar, the block comment is deleted but the internal comment is now part of the code (ie the /* */ doesn't magically reappear).
Is there a way to do nested block comments in Eclipse/CDT? Am I doing this incorrectly? If I want to temporarily comment out a section of the code that already contains comments, how do I do it?
Thanks so much for everyone's help.
Michael
|
|
|
Re: Nested Block Comment problem [message #986002 is a reply to message #984768] |
Sat, 17 November 2012 05:52  |
Eclipse User |
|
|
|
Hello Michael,
Quote:there are problems all over the place due to nested comment blocks
you should avoid nested comments, they are not recommended.
Quote: Am I doing this incorrectly? If I want to temporarily comment out a section of the code that already contains comments, how do I do it?
use CTRL+/ (Toggle comment) this adds // comment style and should not interfere with /* */ comments.
regards,
Klaus
|
|
|
Powered by
FUDForum. Page generated in 0.25774 seconds