If you haven't included any headers that define the namespace, then the compiler won't be able to recognise the name.
Code:
#include <iostream>

using namespace std;

int main() {
    cout << "Hello!" << endl;
}
That should work. What compiler are you on?