I have noticed a very strange behavior when I try to define variable that has type long long int.
For example, code written this way works fine:
#include <stdio.h>
#define STR_LEN 20
int main()
{
long long broj = 1;
char str[STR_LEN];
scanf("%s", str);
return 0;
}
But, code written this way cannot be compiled:
#include <stdio.h>
#define STR_LEN 20
int main()
{
char str[STR_LEN];
scanf("%s", str);
long long broj = 1;
return 0;
}
Compiler provides following message: error C2143: syntax error : missing ';' before 'type' which is not very helpful... I am using Visual Studio 2010.
Any thoughts about this behavior? Thanks.