#include <iostream>
using namespace std; //error here
int main()
{
cout << "COME AT ME BRO!\n"; //error here
return 0;
}
cout は識別できません。以前にこの問題が発生しましたが、コンパイラが機能しなかったため、IDEBean を再インストールしたところ、同じ問題が再び発生しました。ヘルプ :?
cout
std
名前空間内にあります。したがって、使用する必要があるstd::cout<<"...";
か、他のオプションはusing namespace std;
最初に行うことであり、次に使用できますcout<<"...";
std::cout << "COME AT ME BRO!\n";
cout
std
名前空間で定義されています。std::
したがって、すべての前に配置する必要がありますcout
。あなたにはオプションがあります -
#include <iostream>
using namespace std ; // Do this if you need include everything defined in the namespace
using std::cout ; // If the program just uses cout of std namespace
int main()
{
cout << "COME AT ME BRO!\n"; // Now you are free from keeping std:: before cout
return 0;
}