Mail Archives: djgpp/1998/03/22/16:23:16
>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 <conio.h>
>#include <iostream.h>
>
>void main(void)
>{
> clrscr;
> textcolor(RED);
> cprintf("Hello\n");
> highvideo();
> cprintf("World!");
> textcolor(LIGHTGRAY);
> return(0);
>}
>
>
>
>
- Raw text -