On Mon, 31 Dec 2001, Pen Gwynne wrote:
> Eric,
>
> Please do "gcc -v" or "cc -v" and tell us what it says. I have the following
> 4 line program:
>
> int main()
> {
> printf("Hello World!");
> }
>----- snip ----------------------
> Now let me say this. My prompt is the normal, or default
>
> [pen@myhost dir]$
>
> When I run the program what I see is:
>
> Hello World![pen@myhost dir]$
>
For a start you could try adding \n to the end of the string. That should
separate the message and the prompt.
printf("Hello World!\n");
> You should also be aware of one more "funny" thing that Linux does. After
> running a.out, the hello world example, As soon as I type something,
> anything, then the hello world program output and my prompt line:
>
> Hello World![pen@myhost dir]$
>
> is comes just:
>
> [pen@myhost dir]$
Not sure I understand what you are saying, but any output from the
program will be buffered until the shell sees a newline.
>
> It looks like the program never printed anything at all.
>
> Hope this helps.
> /Pen
>
>
--
Len Lawrence @ The Thistle Foundation
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com