URGENT!! background color in c++ using <conio.h>

Hi! How am I supposed to change the entire color of the background? When I do like this:

1
2
3
4
5
6
7

int main()
{
   clrscr();
   textbackground(BLUE);
   cprintf("Hello World");
}


only the Hello World comes with a blue background. The rest comes out as black. Now, what i want is that everything will be in blue background. how can I do that? Thank you in advance :))
Last edited on
closed account (Dy7SLyTq)
what the hell kind of library are you using? i have never seen those before in the c library
this is not in c. it's in c++. we use the following:
#include<iosteam.h>
#include<conio.h>
@sugoidesu

Change the order of the program.

Set the background color, then clrscr(), then print the text.
1
2
3
4
5
6
int main()
{
   textbackground(BLUE);
   clrscr();
   cprintf("Hello World");
}
@DTSCode
I don't understand your responses sometimes. If you don't know, then why do you have to post so rudely? You're not someone else in disguise, are you?

@whitenite1
+1
> it's in c++. we use the following:
> #include<iosteam.h>
since 1998 the header is `iostream' without the .h
closed account (Dy7SLyTq)
I apologize... it was late and i wasnt thinking. sorry didnt mean to be rude
since 1998 the header is `iostream' without the .h

Unless you're one of those people forced to use Turbo C++

Andy
DTSCode wrote:
I apologize... it was late

Ah, I understand that very well. Sorry.

andywestken wrote:
Unless you're one of those people forced to use Turbo C++

I think you are spot-on. Chances are quite high that when people use <conio.h> that they are using an old Borland product.
Topic archived. No new replies allowed.