LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-02-2005, 10:39 AM   #1
k1ll3r_x
Member
 
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

Code:
//hiworld.cpp
#include <iostream.h>
  int main()
    {
    cout << "Hello World";
    return 0;
    }
and to compile i do this

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

Last edited by k1ll3r_x; 05-02-2005 at 10:42 AM.
 
Old 05-02-2005, 10:48 AM   #2
trevelluk
Member
 
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:

Code:
#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-02-2005, 11:54 PM   #3
k1ll3r_x
Member
 
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
thanx
 
Old 05-03-2005, 01:26 AM   #4
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
www.mindview.net 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).
 
  


Reply


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 10:15 AM
Issue with compiling HPNA driver OMV Linux - Software 1 05-14-2004 12:11 AM
Issue Compiling NIC drivers JoAnywhere Linux - General 6 10-23-2003 11:40 PM
Anjuta compiling issue in Slack 9.. JoooN Linux - Software 1 07-03-2003 05:25 AM
Anjuta compiling issue in Slack 9... JoooN Slackware 4 04-16-2003 08:19 PM


All times are GMT -5. The time now is 06:17 PM.

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