I can't compile c++ code with g++
Hi
I couldn't get help on this from "Newbie" forum. So I post this again.- I recetly installed g++ on Fedora. (I used "yum install gcc-c++"). It seemed to be fine but if I try to compile the following very simple c++ code, it just gives me an error mesage sayng "expected constructor, destructor, or type conversion before < token"... #include <iostream> using namespace std; int main() { cout << "Hello World \n"; return 0; } I urgently need g++ to do my project. Please help me. :( |
To install g++, you need to do as root
Code:
#yum install gcc-c++ Code:
$g++ -o hello hello.cpp |
Please don't cross-post, it's against LQ rules.
|
Is there a space between <<?
ta0kira EDIT As in < (space) <. |
There was just a thread about this...
|
Thank you very much for your time, folks.
I re-installed gcc and it's fine now. |
All times are GMT -5. The time now is 07:35 PM. |