|
From: <or...@vp...> - 2003-06-23 08:02:43
|
André Macário Barros wrote:
> Dear Users,
>
> Suppose you can´t use the /* and */ comment delimiters to put in comments
> an area of a code in C++.
> If I use the // command, must I put them in each line of this piece of
> code?
> Is there another way?
There is a quick way:
#if 0
...
#endif
Because "0" is "false", #if 0 can be considered like if (false){...},
which will in fact, never execute. So all code, with or without
comments, will not be parsed by the C preprocessor there.
This approach is also better, because /* */ comments cannot be nested.
--
Greetings,
Balázs
|