. Advertisement .
..3..
. Advertisement .
..4..
How to solve the problem – error: expected declaration or statement at end of input? I have the sample detail:
void mi_start_curr_serv(void){
#if 0
//stmt
#endif
}
While I was running it, I found the warning message:
error: expected declaration or statement at end of input
That is my question in my midterm exam, and it is urgent. I searched the solutions on some websites, but I didn’t get it. I may miss any line or other changes. I appreciate your assistance!
The cause:
You get this error because you are missing
}
,;
or)
some where in your code, so it doesn’t work. For instance:Solution:
To solve this error, you have to add them in your code.
This problem was for me caused by a missing () at the end an if statement in the function that was called by the error. Scroll up to see the compiler’s first error. This error can be fixed by resolving it.