问题
When I compile, I keep getting this error.
mario.c:4:1: error: expected identifier or '('
I've tried changing things and then fixing them and changing other things and then fixing those but nothing seems to help. I'm new at this. Can anyone help?
#include <stdio.h>
#include <cs50.h>
int main(void);
{
int n;
do
{
n = GetInt();
}
while (n=<0);
}
回答1:
Change
int main(void);
^Remove the semicolon
to
int main(void)
and also change
while (n=<0);
to
while (n <= 0);
来源:https://stackoverflow.com/questions/21914660/keep-getting-this-compiling-error