I just started c and have lots of trouble with simple statements.
I got "Declaration is not allowed here in function main"
for the following code:
int main() {
int a;
int *b;
*b = 5;
int c; //error occured here, if I get rid of this line,
//code is fine
return 0;
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.