Ask Your Question

Revision history [back]

As the error from the last output already outlines, use std::cout instead of cout.

[user@localhost test]$ cat test.cpp
#include <iostream>

int main() {
    std::cout << "This is test\n";
    return 0;
}
[user@localhost test]$ g++ test.cpp -o test
[user@localhost test]$ ./test
This is test

As the error from the last output already outlines, use std::cout instead of cout and install and use gcc-c++.

[user@localhost test]$ cat test.cpp
#include <iostream>

int main() {
    std::cout << "This is test\n";
    return 0;
}
[user@localhost test]$ g++ test.cpp -o test
[user@localhost test]$ ./test
This is test