我有一些Code :: Blocks的问题,这是编译后/输出时的输出;Code :: Blocks编译错误
3|iostream: No such file or directory|
4|error: syntax error before "namespace"|
|In function `main':|
8|error: `cout' undeclared (first use in this function)|
8|error: (Each undeclared identifier is reported only once|
8|error: for each function it appears in.)|
||=== Build finished: 5 errors, 1 warnings ===|
我的代码如下;
// my first program in C++
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!";
return 0;
}
这不会解决它,但你应该说'使用命名空间标准;',虽然这不被建议。 – 2012-02-22 22:15:10
您确定您已经创建了C++控制台项目吗? – CyberGuy 2012-02-22 22:21:18
我该怎么做? (我是一个完整的新手)我只做了空白项目? – 2012-02-22 22:22:10