Why using namespace std is necessary here?

Posted by symfony on Stack Overflow See other posts from Stack Overflow or by symfony
Published on 2010-03-24T16:54:27Z Indexed on 2010/03/24 17:03 UTC
Read the original article Hit count: 98

Filed under:
|
#include <iostream>
using namespace std;

int main() {
    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
    return 0;
}

If I remove the 2nd statement,the build will fail.

Why is it necessary?

© Stack Overflow or respective owner

Related posts about c++

Related posts about syntax