Setting the background color and running a program

closed account (NwvkoG1T)
I use turbo c++ 3.0

Please tell me how to set the background color using the function setbkcolor() in graphics.h

will i need to run the exe file in full screen if i use this function?
1) graphics.h is outdated and you may want to look for something that would work with newer OS.
Answer to your question:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
   setbkcolor(BLUE);
/* or */
 setbkcolor(1);
/*Color codes:
Name	Value
BLACK 	0
BLUE	1
GREEN	2
CYAN	3
RED	4
MAGENTA	5
BROWN	6
LIGHTGRAY	7
DARKGRAY	8
LIGHTBLUE	9
LIGHTGREEN	10
LIGHTCYAN	11
LIGHTRED	12
LIGHTMAGENTA	13
YELLOW	14
WHITE	15 */

2) Turbo C++ 3.0? Whaich museum did you rob? This compiler is 20 years old! C++ Standart undergo many changes since then and I don't think it would work well in modern OS
closed account (NwvkoG1T)
could not understand any other IDE that was good and at the same time simple to understand. and if i do #include<fstream.h> in code blocks then it says that there is an error. why? it is a valid header file after all?
Because there is no <fstream.h> in C++ standard. It's <fstream> actually.
http://www.daniweb.com/software-development/cpp/threads/11430/fstream.h-i-thought-it-was-a-standard-header
closed account (NwvkoG1T)
well, what about this

1
2
3
4
5
6
7
8
9
10
11
12

class user
{
int t; 
char ch[10]...

public:
user()
{
strcpy(ch,'NULL');
}


now it says that strcpy has not been defined in this scope. I have included string.h. Please help.
Topic archived. No new replies allowed.