first program
Will Elmes
welmes@ptd.net
Wed Nov 24 01:17:00 GMT 1999
was able to execute by:
$./hello
it works fine then!!
<hwidjaja@my-deja.com> wrote in message news: 81dcoe$aec$1@nnrp1.deja.com ...
> I tried exactly the same as what you did, but I got the hello message.
> try put endl at the end of cout statement.. to make sure it flush out
> the message
> cout << "hello" << endl;
>
> hope this help.
> In article < Lhm_3.14$ES2.1534@nnrp1.ptd.net >,
> "Will Elmes" <welmes@ptd.net> wrote:
> > this is my first attempt at compiling and running a program under
> linux.
> > this doesn't make sense but when i attempt to run it absolutely
> nothing
> > happens.
> >
> > #include <iostream.h>
> > int main(void)
> > {
> > cout << "hello!!";
> > }
> >
> > then to compile:
> > $g++ -Wall -c hello.cpp
> >
> > then to link(i think i need to do this?>?):
> > $g++ hello.o -o hello
> >
> > then to execute:
> > $hello
> >
> > i get nothing.....any help for a newbie would be appreciated.
> >
> > thanks!!
> >
> > welmes@ptd.net
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
More information about the Gcc-help
mailing list