| | |
include file problem
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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?
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?
•
•
Join Date: Jan 2004
Posts: 7
Reputation:
Solved Threads: 0
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[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;
}
#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[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;
}
![]() |
Similar Threads
- First Assembly file problem (Assembly)
- <%@include file> (JSP)
- New member with a system file problem... (Windows NT / 2000 / XP)
- "Cannot Open Include File" MS Visual C++ error (C++)
- question about an include file (PHP)
- How to set up include file for navbar (HTML and CSS)
- Include a file from another website (ASP)
Other Threads in the C++ Forum
- Previous Thread: visual c++ 6.0
- Next Thread: A question about 'const'
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





