|
-
April 8th, 2010, 07:05 AM
#6
Re: a clean macro to make a part of code obsolete
 Originally Posted by S_M_A
Why not just comment the code out? If you use the block comment/uncomment command (select a block and Ctrl+K, Ctrl+C / Ctrl+K, Ctrl+U in VC) it's also easier to reactivate the code part by part (no need for adding #ifdef / #endif pairs)
The problem with that approach is that it doesn't work if there is already a block comment in your code or if you want blocks within blocks.
Code:
void foo()
{
/*
/*
*/ // comment ends here
*/ // compiler error
}
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|