include file problem

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2004
Posts: 23
Reputation: iamboredguy is an unknown quantity at this point 
Solved Threads: 0
iamboredguy's Avatar
iamboredguy iamboredguy is offline Offline
Newbie Poster

include file problem

 
0
  #1
Sep 8th, 2004
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?
Reply With Quote Quick reply to this message  
Join Date: Jan 2004
Posts: 7
Reputation: fishman is an unknown quantity at this point 
Solved Threads: 0
fishman fishman is offline Offline
Newbie Poster

Re: include file problem

 
0
  #2
Sep 8th, 2004
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;
}
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC