954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

include file problem

Since no one cared to answer my thread posted earlier, :mad: I'm posting the question again.
I have this project to do and I want to use coloured text and some simple shapes, etc. But the problem is that my compiler does not support graphics.h or dos.h. Even my tclite doesn't (I mostly use BC5 windows version). Is there any way of correcting this problem? Or maybe another version which does support?
Will someone PLEASE help?

iamboredguy
Newbie Poster
23 posts since Aug 2004
Reputation Points: 12
Solved Threads: 0
 

Try this code, coloured text and backgrounds in dos

#include
#include
using namespace std;
int main()
{
char intro[] = "Color Demo for Dev-C++ 4.9";
for(int b=0; b<=26; b++)
{
textcolor(b+1);
cout << intro[b];
}
cout << endl;
cout << endl;
textcolor(WHITE);
textbackground(BLACK);
system("pause");

cout << endl;
cout << "TEXT COLOURS" << endl;
cout << endl;
for(int a=0; a<=500; a++)
{
textcolor(a);
cout << a;
textcolor(WHITE);
textbackground(BLACK);
cout << " ";
if( (a+1) %16 == 0)
cout << endl;
}
cout << endl;
system("pause");
cout << endl;;

textcolor(WHITE);
textbackground(BLACK);
cout << "BACKGROUND COLOURS" << endl;
cout << endl;
for(int a=1; a<=16; a++)
{
textbackground(a);
cout << a;
textbackground(BLACK);
cout << " ";
}

cout << endl;
cout << endl;
system("pause");
return 0;
}

fishman
Newbie Poster
7 posts since Jan 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You