LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   c++ (https://www.linuxquestions.org/questions/programming-9/c-4032/)

iain 07-07-2001 06:10 AM

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

mindsport 03-03-2020 08:29 AM

add #include <iostream.h> to the top of your Hello.cpp
also try using gpp instead of gcc

TB0ne 03-03-2020 08:34 AM

Quote:

Originally Posted by mindsport (Post 6096647)
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.

BW-userx 03-03-2020 08:55 AM

n/m


All times are GMT -5. The time now is 01:44 AM.