vs2010编译错误解决方法
2013-09-20 15:22
337 查看
1.
在VC6下只要
try{
}
catch(Exception ex){
}
在VS2010中
1)要把项目设置加上支持公共语言支持库(/CLR),再添加代码:
using namespace System;
try
{
}
catch(System::FormatException ^ex) //要^
{
}
2)第二种方法(不需要公共语言支持库/CLR):
using namespace std; //命名空间
#include <exception> //头文件
try
{
}
catch(exception ex)
{
}
在VC6下只要
try{
}
catch(Exception ex){
}
在VS2010中
1)要把项目设置加上支持公共语言支持库(/CLR),再添加代码:
using namespace System;
try
{
}
catch(System::FormatException ^ex) //要^
{
}
2)第二种方法(不需要公共语言支持库/CLR):
using namespace std; //命名空间
#include <exception> //头文件
try
{
}
catch(exception ex)
{
}
相关文章推荐
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)(转载)
- 在vs2010中编译log4cxx-0.10.0具体方法(从下载、编译、解决错误具体介绍)
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)
- vs2010建立win32 application 编译错误(用vc6.0建立此工程正常运行)解决方法
- VS2010编译错误:This file requires _WIN32_WINNT to be #defined at least to 0x0403...的解决方法
- VS2010编译错误: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403的解决方法 .
- VS2010编译错误: fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏解决方法
- NASA World Wind_1.4.0版本在VS2010中编译错误解决方法
- vs2010打包系统必备选择.net framework 3.5sp1编译错误的解决方法
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)
- vs2010 项目或者MFC编译错误 转换到coff期间失败的详细解决方法
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)
- vs2010上进行ACE编程常见编译错误解决方法
- VS2010编译错误 #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403的解决方法
- 编译XORG的错误集锦及解决方法(持续更新中)
- 解决在win7中用vs2010编译openssl中出现把警告当做错误的报错问题