簡體   English   中英

我在玩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();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM