原因:
C++ 1998 要求cout and endl被调用使用‘std::cout‘和‘std::endl‘格式,或using namespace std;
修改后:
#include<iostream>
std::cout << "Hello World!" << std::endl;
或者
#include<iostream>
using namespace std;
error: `cout' was not declared in this scope
原文地址:https://www.cnblogs.com/ProtoDrive/p/9775858.html
时间: 2024-10-10 01:15:01