vc6.0入门教程 vc 6.0怎么添加新cpp?

[更新]
·
·
分类:互联网
1805 阅读

vc

vc 6.0怎么添加新cpp?

6.0怎么添加新cpp?

如何在VC 中手工添加一组.hvc 6.0和.cpp文件
我自己编了个编函数,想把它放在一个cpp中,我通过“工程——添加工程——新建...”方法加入了一个.h和.cpp文件。但编绎的时候,出现以下错误:
d:sh
dskmy.cpp(6) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Fatal Error C1010
unexpected end of file while looking for precompiled header directive
A precompiled header was specified, but it did not contain a precompiled header directive.
This error can be caused by specifying an incorrect file as a header file, or by specifying an include file with the /Yu (Use Precompiled Header) command line option that is not listed in the source file as an include file.
如果代码是从网页上copy后在*.cpp, *.h文件中粘贴的话,很可能会出现VC不能识别的字符,如|、:、;等,这符号的不同很难看得出,最好是自己重新再敲一次键盘,注意不要打开输入法。。。
之所以要加入#include stdafx.h
是因为你在编译的时候选择了预编译头文件.
可以在project-setting-c : category中选择Precomplid headers
然后选择是否设置预编译头文件.

vc6.0怎么保存源程序?

编译之后去debug中,找到exe,运行~ 如果出现一闪而过,那是因为程序执行速度快,想要看到结果,在程序后边加getchar();