I have the following code:
gcc test.c -o test -D ARGUMENT 2
and I want it to define ARGUMENT with a value of 2, but it says it can't find file 2 or whatever. How to do it?
Try
-DARGUMENT = 2
gcc test.c -o test -D ARGUMENT=2
You can also use gcc test.c -o test -DARGUMENT .
gcc test.c -o test -DARGUMENT
ARGUMENT will be defined without value, but you can still check it with help #ifdef and friends.
#ifdef