在vc++中运行c++程序时出现可视致命错误
visual fatal error in vc++ while running c++ program
我是vc++新手。
#include<iostream.h>
void main()
{
cout<<"hi this is vc++";
}
编译…
h.cpp
c:program filesmicrosoft visual studiomyprojectsnew1h.cpp(7):致命错误C1010:查找文件时意外结束预编译头指令执行cl.exe出错
h。对象- 1个错误,0个警告
Visual c++默认使用预编译的头文件,这个特性加快了编译速度,但这意味着你需要在你的cpp文件的顶部有一个#include "stdafx.h"。
另一种选择是关闭预编译头文件。下面是如何做到这一点(源代码和更多细节在这里):
在Visual Studio 2010中,通过右键单击CPP项目,选择"属性"并导航到"配置属性C/c++ 预编译头文件",可以从GUI控制此设置。对于其他版本的Visual Studio, GUI中的位置会有所不同。
相关文章:
- 使用快速排序对 C++ 中的可视化工具错误进行排序
- 可视抽象类 c++(错误 LNK 2001:未解析的外部符号)
- 生成可视C++ 2008 项目时出现链接器错误
- 可视化C++中的结构定义错误
- 在可视化解决方案 c++ 中获取链接器错误
- 在Visual Studio 2019中构建简单的点云可视化代码时,来自PCL的第三方库的多个错误
- 可视化如何使用C++程序获取DHCPV6服务器IP.我尝试使用DHCPv6RequestParams,但总是收到错误代码
- 如何修复可视化工作室中的"C2061语法错误标识符"堆栈?
- 可视C LNK2005与ENUM有关的错误
- 可视C++编程错误:C4703、C4700
- 可视化解决我列表中的C++类模板错误
- CDT 可视化 c++ 支持错误
- 可视 C++ 错误 C3867
- 可视C++指针机制 - 错误 2440
- 使用删除 [] 和新(放置)运算符的可视C++堆损坏错误
- 内联关键字导致可视化C++中链接器错误 2019
- 可视C++窗体应用程序错误: C3374
- C++中的可视外部:对于外部 VarX 变量::错误 LNK2001:未解析的外部符号"unsigned int VarX" (?VarX@@3IA)
- PCL可视化错误
- 在vc++中运行c++程序时出现可视致命错误