错误:count was not declared in this scope

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

#include

int main(void)
{
      cout<<"helloworld"<

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


#include

int main(void)
{
      using namespace std;

      cout<<"helloworld"<


你可能感兴趣的:(C++)