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
It compiles fine for me when I copy/paste your code into a file and compile using gcc in linux. Are you absolutely sure that what you've posted and what you're compiling are the same?
posted 5 days ago
yes and the code is from the video found here talking about creating pointers.
https://www.youtube.com/watch?v=mw1qsMieK5c Looks like that guy in youtube video uses something other than Visual studio to.
Its is a direct copy and paste from my project.
Unfortunatly I really need it to work in Visual Studio. All my work is in that