Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Nested Block Comment problem(trying to create nested blocks removes /* */)
Nested Block Comment problem [message #984768] Thu, 15 November 2012 00:02 Go to next message
Michael Oswald is currently offline Michael Oswald
Messages: 1
Registered: November 2012
Junior Member
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 10:52 Go to previous message
Klaus Mr is currently offline Klaus Mr
Messages: 116
Registered: November 2011
Senior Member
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


Previous Topic:Eclipse complains about working code
Next Topic:Removing Syntax Errors indicated by Eclipse
Goto Forum:
  


Current Time: Sun Sep 21 12:19:44 GMT 2014

Powered by FUDForum. Page generated in 0.01477 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software