c++ 出现调试警告hello.exe - 0 error(s), 0 warning(s) 看不出什么原因

来源:百度知道 编辑:UC知道 时间:2024/07/02 23:04:49
程序是:
#include <iostream>

int main()
{
std::cout <<"hello world!\n";
return 0;
}

后面的错误信息是
--------------------Configuration: hello - Win32 Debug--------------------
Compiling...
hello.cpp
Linking...

hello.exe - 0 error(s), 0 warning(s)
那位大侠能指点迷津·· 程序应该没错

没error,没waring还不高兴?我看到0 error(s), 0 warning(s)眼睛里都能放光!

后面的错误信息是
--------------------Configuration: hello - Win32 Debug--------------------
Compiling... 编译中....
hello.cpp hello.cpp
Linking... 链接中...

hello.exe - 0 error(s), 0 warning(s)
hello.exe - 0 错误 ,0 警告

程序是正确的
那位大侠能指点迷津·· 程序应该没错

额 这个不是错误信息 是告诉你 编译成功

是visual c++吧

你说的是不是运行后没有显示结果 那是运行太快 你还没看见就退出了

你这么改
#include <iostream>
#include <cstdlib>

int main()
{
std::cout <<"hello world!\n";
system("pause");
return 0;
}
这样就会暂停了

以前一直以为来这里问的人都因为出现了错误了。今天……今天我终于知道了,原来最高境界是没错误也来问,“为什么没错误???!!!”,问到你吐血!~!@