Daniel M. answered 06/03/19
Award Winning Lead Software Engineer and College Instructor
If you could provide more information on what you are expecting from the code I could offer more detailed answers.
In your first example you define 'linux' as an integer variable and assign it the value 5.
Your second second example you are trying to create a variable named '1' which is not allowed. Variables names must not start with numbers.
If you are trying to write code specifically to compile only under Linux use:
#ifdef linux
// your code
#endif
or a more generic version:
#ifdef __unix__
// your code
#endif
Under windows you would use the macros _WIN32 or _WIN64.
These macros are recognized by the compiler.
Another option is to define your own macros and initialize them by use of compiler command line switches or options.