错误:count was not declared in this scope

来源:互联网 发布:事件提醒软件 编辑:程序博客网 时间:2024/05/29 08:47

由于C++ 1998要求 cout and endl 使用std::cout,std::endl格式,或者在程序开始申明“ using namespace std;”,不然会出现”cout was not declare this in scope“的错误

#include<iostream>int main(void){      cout<<"helloworld"<<endl;      return 0;}

修改成下面的代码就可以了


#include<iostream>int main(void){      using namespace std;      cout<<"helloworld"<<endl;      return 0;}


0 0
原创粉丝点击