From: Andrej Aderhold Newsgroups: comp.os.msdos.djgpp Subject: little problem but great troubles Date: Wed, 02 Dec 1998 18:03:23 +0100 Organization: Online-Kiosk GmbH & Alphacom GmbH Lines: 29 Message-ID: <366572DA.75D0D92A@spektracom.de> NNTP-Posting-Host: b239.spektracom.de Mime-Version: 1.0 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 2 Dec 1998 18:07:42 GMT X-Mailer: Mozilla 4.04 [en] (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com

hi there,

I've got a really stupid problem crouching up everytime with djgpp. So far I couldn't
solve it but its probably sth. with the buffer. here it goes.

#include <iostream.h>
#include <conio.h>

main()
{
    cout << " some stuff";
    getch();         // or even when, while(!kbhit());
}

' some stuff' first appears at the screen when I hit the key, and then the programm terminates. So, now when I put a \n behind stuff like

cout << " some stuff\n";

it's doing it right. It first shows the line and then - on keyhit - terminates.
I would be glad if somebody could explain this to me.
Andrej Aderhold