+ 7
Why can't '#define' define this?
#define ... ; Why is the preprocessor not allowing it? I wanted to make things like this: #define printing cout //Working. !!! #define ... ; //Error. !!! printing<<"Hi"... //In main #define is used for substitutions, right? Then this should work! Is it that alphabets are required, and define won't work without them??
6 Respuestas
+ 10
You're prolly trying to do something like this?
https://code.sololearn.com/cuN2aN7mD9v6/?ref=app
+ 9
Yeah I've looked at the MSDN C++ docs and ... is not a valid identifier. Here is the list of valid identifiers:
https://msdn.microsoft.com/en-us/library/565w213d.aspx
+ 8
Because the second argument must be a keyword a constant or a statement.
+ 6
Ok, so I can only use valid identifiers in the first argument?
That explains the error...
Thank You!!!
+ 6
Yes! ... Something more 'English'...
+ 5
Its a null statement.
And anyway, this works:
#define ever ;;
for(ever) //in main
{}