为什莫检查的时候没有错 而运行的时候有两个错求解
# include<stdio.h># define N 3
void main(void)
{
char name[10];
int age;
char sex;
float maths,english,computer;
double average;
printf("please enter your name,age,sex:");
scanf("%s%d%c",name,&age,&sex);
printf("please enter your scores(maths,english,computer)");
scanf("%f%f%f",&maths,&english,&computer);
average=(maths+english+computer)/N;
printf("name=%s,age=%d,sex=%c\nmaths=%f,english=%f,computer=%f,average=%f\n",name,age,sex,maths,english,computer);
}
错误显示:--------------------Configuration: q - Win32 Debug--------------------
Linking...
w.obj : error LNK2005: _main already defined in q.obj
Debug/q.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.