C++ compiles but gives error when executed
问题 I am new to Linux Ubuntu 11.10 and have basic C++exposure. I installed the g++ by sudo apt-get install build-essential and created a directory cpp in my home directory. I then wrote a program hello.cpp in my cpp directory #include <iostream> using namespace std; int main() { cout << "Hello !" ; return 0; } and compiled using g++ -W hello.cpp -o hello The program compiles without any errors/warnings. When I try to execute the file ./hello.cpp I get error messages: line 3: using: command not