Is there some way to group related code inside a class? For example, if dealing with a renderer class I'd like to group all the methods related to dealing with surfaces, all those with displaying on screen, etc.
I tried doing this with { }, but I got an error message from the compiler. Is there some other way of doing this in CodeBlocks?
Thanks
Please give some piece of your code. Thanks.
When I want to group code inside a file, I use:
//{Meaningful section start
...(code to group)
//}Meaningful section end
As the brackets are into comments, compiler don't try to parse them and don't throw an error but codeblocks notice them and put an '+' symbol on the margin so I can hide an show this section, regardless of that is not a code section following the language rules.
Quote from: Ganbito on December 28, 2008, 12:58:16 PM
When I want to group code inside a file, I use:
//{Meaningful section start
...(code to group)
//}Meaningful section end
As the brackets are into comments, compiler don't try to parse them and don't throw an error but codeblocks notice them and put an '+' symbol on the margin so I can hide an show this section, regardless of that is not a code section following the language rules.
This is an informative message.
Thanks for sharing the trick.
It should be added to wiki page, :D.