Netbeans C++ 奇怪的输出
Netbeans C++ Weird output
#include <iostream>
using namespace std;
int main(){
cout<<"Hello World!"<<endl;
}
我最近安装了 netbeans 12.0,当我编译上面的代码时,它说了一些奇怪的单词和数字以及一个字母 'H'。
using
、namespace
、cout
和 endl
等词也带有下划线,当我悬停在它上面时,它显示:
unable to resolve identifier + 'word'
这是输出:
PSID=1493
NBMAGIC=1492
H
RUN SUCCESSFUL (total time: 101ms)
正如@user4581301 指定的那样,程序运行并立即退出,因此您看不到任何东西。所以,我们需要一些东西来暂停程序。
#include <iostream>
using namespace std;
int main(){
cout<<"Hello World!"<<endl;
system("pause");
}
#include <iostream>
using namespace std;
int main(){
cout<<"Hello World!"<<endl;
}
我最近安装了 netbeans 12.0,当我编译上面的代码时,它说了一些奇怪的单词和数字以及一个字母 'H'。
using
、namespace
、cout
和 endl
等词也带有下划线,当我悬停在它上面时,它显示:
unable to resolve identifier + 'word'
这是输出:
PSID=1493
NBMAGIC=1492
H
RUN SUCCESSFUL (total time: 101ms)
正如@user4581301 指定的那样,程序运行并立即退出,因此您看不到任何东西。所以,我们需要一些东西来暂停程序。
#include <iostream>
using namespace std;
int main(){
cout<<"Hello World!"<<endl;
system("pause");
}