cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/05/18:23:50

From: "Christopher Nelson" <paradox AT gye DOT satnet DOT net>
To: <djgpp AT delorie DOT com>
Subject: Re: cout and gotoxy
Date: Mon, 5 Apr 1999 12:46:09 -0600
Message-ID: <01be7f94$921b42a0$LocalHost@thendren>
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Reply-To: djgpp AT delorie DOT com


>#include <iostream.h>
>#include <conio.h>
>
>
>void main(){
>clrscr();
>
>for(int i=0;i<50;i++){
>gotoxy(10,10);
>cout<<"Hello World";
>}
>
>}//end main


because _technically_ cout should not use the console's control functions.
it's a _stream_.  in TCC, they've modified the cout library to use their own
console driver OR have used specific DOS interrupts to set cursor position.

'course, I may be wrong, but that's what I remember.  for example, printf
does not use the current cursor position and color, however, cprintf
(con-printf) _does_.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019