什么问题??
看代码:程序代码:
#include <iostream> #include <iomanip> #include <string> using namespace std; struct Student { int num; string name; char sex; int age; }; int main() { Student stu={97001, "LinLin", 'F', 19};//好似问题在这里,但我不知道怎么修改!! cout<<"Num: "<<stu.num<<endl; cout<<"Name:"<<stu.name<<endl; cout<<"sex:"<<stu.sex<<endl; cout<<"Age:"<<stu.age<<endl; return 0; }//但这在vc6.0 编译时会出错,在vs2010不会出错,怎么回事???什么错误???