C++ IDE BEAN 1.6.9 issue
#include <iostream>
using namespace std; //error here
int开发者_JAVA技巧 main()
{
cout << "COME AT ME BRO!\n"; //error here
return 0;
}
cout is unidenfitiable. I had this issue earlier but my compiler didn't work so I reinstalled IDEBean and having the same issue again from square one. Help :?
cout
is inside std
namespace. So you should use std::cout<<"...";
or the other option is to do using namespace std;
at the beginning and then you can use cout<<"...";
std::cout << "COME AT ME BRO!\n";
cout
is defined in std
namespace. So, you need to place std::
before every cout
. You are how ever have options -
#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;
}
精彩评论