R
Roman Mashak
Hello, All!
I'm trying to set up macro:
....
int main(int argc, char *argv[], char *envp[])
{
....
if ( argc > 1 ) {
if ( strcmp(argv[1], "-d") == 0 ) {
#define DEBUG
...
}
}
....
#ifdef DEBUG
fprintf(stdout, ...);
#endif
....
}
So, when I put '-d' switch on a command line, DEBUG should be on and
available for usage further up in code. But it fails, where did I make bug?
Thanks.
With best regards, Roman Mashak. E-mail: (e-mail address removed)
I'm trying to set up macro:
....
int main(int argc, char *argv[], char *envp[])
{
....
if ( argc > 1 ) {
if ( strcmp(argv[1], "-d") == 0 ) {
#define DEBUG
...
}
}
....
#ifdef DEBUG
fprintf(stdout, ...);
#endif
....
}
So, when I put '-d' switch on a command line, DEBUG should be on and
available for usage further up in code. But it fails, where did I make bug?
Thanks.
With best regards, Roman Mashak. E-mail: (e-mail address removed)