Did you use
[tt]g++ test.cpp[/tt]
gcc is the 'C' compiler, used to compile prog.c files
g++ is the 'C++' compiler, used to compile prog.cpp files
> newhello.c:1:20: iostream: No such file or directory
Because this is now a C program, which you should compile with gcc, and use #include <stdio.h> (not iostream) for standard input/output.
--