-
C++ Compiler
I use Linux 7.1 , and i can compile C and Java , but now i tried to compile C++ and i got error massages.
the program was
#include<iostream.h> // or <iostream>
void main(void)
{cout << "hello\n";}
i compiled with
cc -o runningname file.cpp
I think the error comes with the <iostream>,in the /usr/include directory i see all C header files but no iostream , but in YaST the GNU C++ Compiler is installed.
-
You ran the C compiler
Try
g++ -o runningname file.cpp
-
Thanks , now its running !
-
It's been some time, and it might vary from *nix to *nix, but when I last used one, the C compiler was cc while the C++ compiler was CC.
-
I think it depends on the distro...I think there was a gpp, g++, and gcc...I only saw gpp on 1 distro of Linux though.