初学者,谢谢帮我看下错在哪里...
#include<iostream.h>#include<conio.h>
#include<string.h>
#include<iomanip.h>
using namespace std;
class stu
{
private:
int num;
char name[10];
int age;
public:
stu(int n,char a[10],int e)
{ num=n;
strcpy(name,a);
age=e;
}
void display()
{ cout<<num<<setw(6);
cout<<name<<setw(3);
cout<<age<<endl;
}
};
int main()
{ clrscr();
stu stu1(10,"lvyan",19), stu2(11,"xufan",20);
stu1.display();
stu2.display();
cin.get();
return 0;
}
--------------------Configuration: 123 - Win32 Debug--------------------
Compiling...
1.cpp
e:\vc\vc6cn\myprojects\123\1.cpp(36) : fatal error C1010: unexpected end of file while looking for precompiled header directive
执行 cl.exe 时出错.
123.exe - 1 error(s), 0 warning(s)