posted 5 years ago
I have the following simple code in C.
#include <stdio.h>
int main()
{
int x = 7;
printf("x is %d\n",x);
x = 14;
printf("x is %d\n", x);
int *aptr = &x;
}
As soon as I add the line int *aptr = &x; I get missing ';' before 'type' when I try to compile. Why would that happen? Everything looks fine and compiles fine except when I add that new line. What I am doing should work.
Iam using Visual Studio Professional 2012
thanks