如何判读vc中句子的行(例如)
C:\Documents and Settings\Administrator\Cpp1.cpp(17) : error C2144: syntax error : missing ';' before type 'float'Error executing cl.exe.
Cpp1.obj - 1 error(s), 0 warning(s)-----17行有问题??
# include<stdio.h>
struct stu
{int num;
char *name;
char sex;
float score;
} boy[5]={
{101,"china",'m',45},
{102,"Zhang ping",'M',62.5},
{103,"He fang",'F',92.5},
{104,"Cheng ling",'F',87},
{105,"Wang ming",'M',58},
};
void main()
{
int i,c=0-----------------------------------出错的。。。但是数出是16行的?
float ave,s=0;
for(i=0;i<5;i++)
{
s+=boy[i].score;