From: Nicolas Blais Newsgroups: comp.os.msdos.djgpp Subject: Re: Conio's cprintf problem Date: Sun, 22 Mar 1998 18:33:25 -0500 Organization: Elemental Technologies Lines: 38 Message-ID: <35159FC4.DA455BCF@netrover.com> References: <3 DOT 0 DOT 32 DOT 19980322221412 DOT 006a73cc AT uniserv DOT uniplan DOT it> NNTP-Posting-Host: 198.168.87.13 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Compiler gives : Warning: Unkown escape code ("\c") and when I run hello.exe, I see the c in the new line. Angelo Pesce wrote: > >Hi, whenever I compile and run this code, the "World!" string is placed > >below the "Hello" but after the "o". How do I make it got in the > >beggining of the line andenot and the end of Hello. Here's what it shows > >on the screen: > > > >Hello > > World! > > That's coz cprintf \n is only line feed but it doesn't perform a carridge > return. You should use \n\c instead (if I remember well) > > > > >'--------------CODE----------------------------------------- > >#include > >#include > > > >void main(void) > >{ > > clrscr; > > textcolor(RED); > > cprintf("Hello\n"); > > highvideo(); > > cprintf("World!"); > > textcolor(LIGHTGRAY); > > return(0); > >} > > > > > > > >