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?

Try this code, coloured text and backgrounds in dos

#include<iostream>
#include<conio.c>
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;
}
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;
}

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.