A suffix is something "added at the end". So when the compiler complains about an invalid suffix at the end of the integer constant, it's upset by the single token
10CELSIUS
as it recognises the CELSIUS
within as integer suffix. Allowed suffixes are (N1570 § 6.4.4.1/1):
u
ul
ull
l
lu
ll
llu
These are small L letters, the up case version of each letter is allowed, too (though not lL
or Ll
in any combination)
They mean unsigned, long and long long and affect the type of the preceding integer constant.
Thus, to achieve macro substitution you need to separate the integer constant with a space, thus producing the token CELSIUS
which can then be replaced with *10
by the preprocessor:
#include <stdio.h>
#define CELSIUS *10
int main()
{
int testVar=0;
if(!testVar) testVar = 10 CELSIUS;
printf("%d\n", testVar);
return 0;
}
Note: This is a more modern signature for the main function. Even better (IMO) would be int main(int argc, char **argv);