-->
Showing posts with label Program understand textcolor() and textbackground() function. to know textcolor(). to know textbackground. Show all posts
Showing posts with label Program understand textcolor() and textbackground() function. to know textcolor(). to know textbackground. Show all posts

Program understand textcolor() and textbackground() function

using turboc++
------------------------------------------------------------------------------
//understanding textcolor in graphics
#include<stdio.h>
#include<conio.h>// contains textcolor() and text background().
void main()
{
clrscr();
textbackground(RED);  //Sets background red
textcolor(GREEN);    //sets textcolor green
cprintf("first line...........\n");
textcolor(GREEN);
textbackground(BLUE);
cprintf("This is a test\n");//sends formatted output to the text window on the screen
  //Does not work with printf.
getch();
}

/*second part prints line from that location where
first part is finished
*/
..............................................................................