Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-02-2005, 11:39 AM   #1
Registered: Sep 2004
Location: Laredo, TX
Distribution: Slackware 11.0 [both lap & pc] WinXP
Posts: 164

Rep: Reputation: 30
g++ compiling issue

i know something about java but i dont know alot about c++, but when i use the g++ compiler some message comes out, saying that the #include <iostream.h> is too old or something similar to this, i am using gcc 4.4.3 and it tells me to use some other statement stored in some folder.
id really appreciate the help, maybe its that im doing something wrong when compiling.
this is what im doing

#include <iostream.h>
  int main()
    cout << "Hello World";
    return 0;
and to compile i do this

jerry@virtz~#:g++ hiworld.cpp -o execfile
any help is appreciated

Last edited by k1ll3r_x; 05-02-2005 at 11:42 AM.
Old 05-02-2005, 11:48 AM   #2
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
Yep, iostream.h is the old style. You should do something like this:

#include <iostream>

// Make the standard namespace (containing cout) available
// This line can be omitted if you use std::cout instead of cout
using namespace std;

int main ()
Old 05-03-2005, 12:54 AM   #3
Registered: Sep 2004
Location: Laredo, TX
Distribution: Slackware 11.0 [both lap & pc] WinXP
Posts: 164

Original Poster
Rep: Reputation: 30
kewl it worked, thanx alot, do u know a good website to learn c++ quick? cus all the other ones seem to have old stuff, maybe someone knows about a recent c++ tutorial. :d
if anyone does, id really appreciate if u all post it
Old 05-03-2005, 02:26 AM   #4
Senior Member
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46 has Bruce Eckels Thinking in C++ books (volumes 1 and 2) for free. The annotated solutions guide is $13, I'd recommend it (the books are also available in printed form too).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enlightenment compiling issue Agentvenom Linux - Software 9 04-05-2011 11:15 AM
Issue with compiling HPNA driver OMV Linux - Software 1 05-14-2004 01:11 AM
Issue Compiling NIC drivers JoAnywhere Linux - General 6 10-24-2003 12:40 AM
Anjuta compiling issue in Slack 9.. JoooN Linux - Software 1 07-03-2003 06:25 AM
Anjuta compiling issue in Slack 9... JoooN Slackware 4 04-16-2003 09:19 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration