Monday, May 24, 2010

What does this error in C mean?

I'm using a strucure


struct places{ int x1,y1};





and a function definition


void goable(places p1, places p2, char *name, int n)


{


....


}





Error shown is :


Error1 : 'places' cannot start a parameter declaration


Error2 : ( expected





I've checked everything else in my simple program, everything is just perfect. Actually even those lines are also perfect in my view. But Why is that Error shown????





Also could anyone tell me a book or a pdf, which is about the list of errors that a C program can have.

What does this error in C mean?
You need to add the word "struct" to your parameter declarations:





void goable(struct places p1, struct places p2, char *name, int n)
Reply:use struct places in the function declaration


No comments:

Post a Comment