小编Aak*_*rma的帖子

cout不使用ostream头文件

我读过cout是ostream的一个对象......

但为什么这个代码

#include<ostream>
using namespace std;

int main()
{
cout << "ostream included!" << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)

抛出错误: -

practice1.cpp: In function 'int main()':
practice1.cpp:6:1: error: 'cout' was not declared in this scope
cout << "ostream included!" << endl;
^~~~
Run Code Online (Sandbox Code Playgroud)

我的理解是错误还是有其他错误?(MinGW windows 10)

提前致谢!

c++ cout ostream

0
推荐指数
1
解决办法
774
查看次数

标签 统计

c++ ×1

cout ×1

ostream ×1