why gcc can't compile C++
This problem was solved and this is a stupid question.
But I leave my topic here hope this can helps some one.
Quote:
hi everyone, im new to programming. I only do web programming before.;
i tried to compile those line of codes with gcc on my CentOS 5 server:
Code:
#include <iostream>
using namespace std;
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
cin.get();
}
It gave errors.
I googled it and people said i should use g++ instead of gcc;
Yeah that would be fine but WHY ?
On this site
GCC, the GNU Compiler Collection - GNU Project - Free Software Foundation (FSF) they said gcc can compile c++ as well, why i cannot use it?
Please somebody let me know why, i will appreciate so much. I hate doing things that i dont know why. I will not use g++ to compile my *.cpp until i know why. Thank you.