我在玩VS2017时发现了一些东西
I found something while playing with VS2017
当我试图学习投掷捕获时,我刚刚编译了我的代码,我发现这个输出是什么意思?
#include "stdafx.h"
#include <iostream>
using namespace std;
void MightGoWrong() {
bool error = true;
if (error) {
throw 8;
}
// -------------------------
int main()
{
cout << MightGoWrong;
return 0;
}
输出是:012211A4 这是什么意思?
输出
法典
你没有调用你的函数。
cout << MightGoWrong;
只是打印函数的地址。要称呼它,您应该cout << MightGoWrong();
.
相关文章:
- VS2017,C++包含目录与附加包含目录,子文件夹包含失败-但为什么
- Visual C++(VS2017)中用户定义的转换不明确
- 带有指定长度字符* 参数的 std::regex_search 在 VS2017 中不起作用?
- 从类型列表中递归删除重复项会导致编译器堆空间错误 (VS2017)
- 无法打开包含文件:在 vs2017 上'QtWidgets/qtwidgetsglobal.h'
- VS2017 是否更改了 C++ 中访问 C# 命名空间的方式?
- VS2017调试器:没有地址,可能是由于编译器优化
- CTest 项目目录.未发现任何测试
- 请发现它在 dev 中工作的错误,但在 hackerrank 中不起作用
- 我的 c++ 程序似乎没有发现字符串和我拥有但输入使用 getline 的变量之间的比较
- 致命错误 C1001 :vs2017 15.8.4 的内部错误(编译器文件"msc1.cpp",第
- 关于 std::减少 vs2017 中的未知?
- VS2017 版本 15.8.3 成功编译内联方法,而不返回所需值
- 检测 ICU 库在 VS2017 中失败
- VS2017 #error: : snprintf 的宏定义与标准库函数声明冲突
- CMake VS_PACKAGE_REFERENCES不添加对 VS2017 项目的引用
- 为什么具有静态存储持续时间的同一内联变量在包含在 VS2017 编译的两个翻译单元中时会构造和销毁两次
- Nanoflann发现邻居提出段错误
- UE4无法使用vs2017编译C++项目
- 我在玩VS2017时发现了一些东西