LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-07-2001, 06:10 AM   #1
iain
LQ Newbie
 
Registered: Jul 2001
Location: scotland
Distribution: mandrake 7.1
Posts: 4

Rep: Reputation: 0
Angry c++


I'm new to linux,c++ and computers generally.?
I can't get my "Hello World!"compiled. I run "gcc /home/iain/Hello.cpp. and get "iostream.h no such file...
...I found doc's that said "save as "$LFS/root/Hello.c" but with "iostdl.h" -(this may be wrong I can't remember off hand) -instead of "iostream.h" & then " gcc Hello.c -o hello" and it worked.
I then did what they said for "iostream" but they used g++
"no such command" I get back.So I try with gcc and "iostream.h no such file....! ? Linux was installed from disk linux-mandrake7.1
before I assume it's configured wrong(god help me)can any-one
point me in some direction or other .I've done the usuall check of the spelling. I'm using c++ in 24 hrs as tutorial.
Sorry for the spiel. Any feedback would be appretiated
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-03-2020, 08:29 AM   #2
mindsport
Member
 
Registered: Apr 2005
Location: Florida
Distribution: Slackware 13.1-64bit / 2.6.33.4
Posts: 46

Rep: Reputation: 17
add #include <iostream.h> to the top of your Hello.cpp
also try using gpp instead of gcc
 
Old 03-03-2020, 08:34 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,604

Rep: Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960
Quote:
Originally Posted by mindsport View Post
add #include <iostream.h> to the top of your Hello.cpp
also try using gpp instead of gcc
...and also look at the date of posts; this had been closed for NINETEEN YEARS. I think the OP has figured it out by now.
 
2 members found this post helpful.
Old 03-03-2020, 08:55 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
n/m

Last edited by BW-userx; 03-03-2020 at 09:02 AM.
 
  


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



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration