<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    c++hello world 代碼


    發現錯別字 2年前 提問
    回答
    1
    瀏覽
    5635
    請勿發布不友善或者負能量的內容。與人為善,比聰明更重要!
    回答數量: 1
    等保高級測評師 NISP

    編寫一個hello world的程序是學習C++最基本的。下面給出幾種用C++編寫hello world的方法:

    方法1:

    #include <iostream>
    using namespace std;
    
    int main()
    {
        cout << "Hello World!";
        return 0;
    }

    方法二:

    #include <stdio.h>
    
    int main() {
        printf("Hello World!");
        return 0;
    }

    方法三:

    #include <cstdio>
    #define saySomething(sth) puts(#sth)
    int main()
    {
        return saySomething(Hello world);
    }

    回答所涉及的環境:聯想天逸510S、Windows 10。

    2年前 / 評論
    亚洲 欧美 自拍 唯美 另类