(新人)我用VC6.0一编译就出问题

来源:百度知道 编辑:UC知道 时间:2024/05/17 19:43:11
--------------------Configuration: chaos - Win32 Debug--------------------
Compiling...
1.cpp
c:\documents and settings\chaos\桌面\chaos\chaos\1.cpp(23) : fatal error C1010: unexpected end of file while looking for precompiled header directive
执行 cl.exe 时出错.

1.obj - 1 error(s), 0 warning(s)
什么意思啊?
谁能详细叙述一下VC6.0怎么用?最好举个例子,50分献上
我建工程了,然后才新建一个.cpp文件,输入代码的

#include "string.h"
#include "iostream.h"

void main()
{
class stu
{
private:
int num;
public:
stu()
{
num=10010;
}
void display()
{
cout<<"num:"<<num<<endl;
}
};
stu stu1;
stu1.display();
}

VC++需要像JAVA那样设置环境变量吗?

参考答案  回首时那短短的一瞬

缺少头文件?
你是一个文件直接编译而不是附加在工程里面吧

重新建立一个工程并重写代码试试

把1.cpp的代码全贴出来吧