I'm just using <iostream>. No h.
[EMAIL PROTECTED] wrote:
> On Fri, 3 Mar 2000, Chris Bennett wrote:
>
> > I Believe that this is simalar to what I have been wondering.
> > what includes would I need for cout and cin?
> > there are commands that are included in the tutorial thjt I am looking
> > through
> > It dosen't look like iostream.h is cutting it
> >
> I don't know or like c++ enough to add cin to Greg's little hellow world
> program, but if you will settle for a demonstration of cout maybe I can
> show you. I think it would handle cin, if only I knew how to call it.
>
> Script started on Fri Mar 3 23:07:34 2000
> witsend:~$ cat hw.c
> #include <iostream.h>
> int main(void){ cout<<"Hello World"<<endl; }
> witsend:~$ gcc hw.c
> hw.c:1: iostream.h: No such file or directory
> witsend:~$ cp hw.c hw.C
> witsend:~$ gcc hw.C
> /tmp/ccKou90t.o: In function `main':
> /tmp/ccKou90t.o(.text+0xa): undefined reference to `endl(ostream &)'
> /tmp/ccKou90t.o(.text+0x17): undefined reference to `cout'
> /tmp/ccKou90t.o(.text+0x1c): undefined reference to
> `ostream::operator<<(char const *)'
> /tmp/ccKou90t.o(.text+0x27): undefined reference to
> `ostream::operator<<(ostream &(*)(ostream &))'
> collect2: ld returned 1 exit status
> witsend:~$ gcc hw.C -lstdc
> /usr/i386-slackware-linux/bin/ld: cannot open -lstdc: No such file or
> directory
> collect2: ld returned 1 exit status
> witsend:~$ gcc hw.C -lstdc++
> witsend:~$ hw
> Hello World
> witsend:~$ g++ hw.c
> witsend:~$ hw
> Hello World
> witsend:~$ exit
> exit
>
> Script done on Fri Mar 3 23:11:44 2000
>
> This is gcc-2.95.1, BTW :-)
>
> Lawson
>
> Installation is performed in the reverse order of removal.
> - British Leyland shop manual
>
>
> ________________________________________________________________
> YOU'RE PAYING TOO MUCH FOR THE INTERNET!
> Juno now offers FREE Internet Access!
> Try it today - there's no risk! For your FREE software, visit:
> http://dl.www.juno.com/get/tagj.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs