Re: question about code comment



Ethan Meyers a écrit :
Hi everyone,
I want to handle the "/* */" style comment in a file, for example,
there are two programs in a file:
int main()
{int x;return 0;}
int main()
{int y;return 0;}
How to use other preprocess to comment out one of the main() rather
than using "/* */"?
If there are more code segments, is your solution still applicable?

#if 0 /* 0 or 1 */ int main() {int x;return 0;} #else int main() int y;return 0;} #endif

--
C is a sharp tool
.



Relevant Pages

  • Re: #define and (brackets)
    ... Well I passed this through cl /E (preprocess to stdout) and got ... int main ...
    (microsoft.public.vc.language)
  • Re: question about code comment
    ... Ethan Meyers wrote: ... there are two programs in a file: int mainint main ... How to use other preprocess to comment out one of the mainrather ... Robert ...
    (comp.lang.c)
  • question about code comment
    ... {int x;return 0;} ... How to use other preprocess to comment out one of the mainrather ... Prev by Date: ...
    (comp.lang.c)
  • Re: file size error - urgent
    ... Imran wrote on 10/08/04: ... > int main ... The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html ... "C is a sharp tool" ...
    (comp.lang.c)
  • Re: Pointers in methods??
    ... > Is it only allowed to make a pointer point to something in a method?? ... > int x; ... The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html ... "C is a sharp tool" ...
    (comp.lang.c)