#include<string.h>
using namespace std;
class student
{ public:
student(int i,nam[],int s):id(i),score(s)
{strcpy(name,nam);
}
static float total;
static int count;
void ChangeScore();
static float GetAverage();
private:
int id;
char name[20];
int score;
};
//6 24 C:\Users\2678081982\Desktop\cpp\实验八1.cpp [Error] ‘nam’ has not been declared
请教一下各位大佬,这个是怎么回事呀,我看书上就是这样写的。谢谢好心人的帮助!