473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to give color for each print out indivisualy

6
//* if i want to give for each out put word
what kind of data or preprocesser i have
to use *//
// for example

int main(){
int color;
cout << "please enter 1- 2 : ";
cin >> color;
switch(color){
case 1:
system( " color 0a);
cout << " green "<< endl;
break;
case 2:


system("color 0c" );
cout <<" red " << endl;
break;
default:
cout << " wrong key "<< endl;
}
return 0;
}
Apr 16 '16 #1
1 4080
weaknessforcats
9,208 Expert Mod 8TB
There's no provision in C or C++ for color.

You need to acquire a graphics library that works with your compiler and operating system. Then you write your C/C++ code to make calls to functions in that library to do your color changing.

Of course, these libraries are written in C/C++ but it requires expert programmers to do it. Better to use one of these than do it yourself.
Apr 16 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dan Christensen | last post by:
The test below is done with Python 2.4a1 compiled from source, but the same thing happens with Debian's python2.3_2.3.4-2. Python 2.4a1 (#1, Jul 11 2004, 12:20:32) on linux2 Type "help",...
23
by: stewart.midwinter | last post by:
No doubt I've overlooked something obvious, but here goes: Let's say I assign a value to a var, e.g.: myPlace = 'right here' myTime = 'right now' Now let's say I want to print out the two...
10
by: techy techno | last post by:
Hiii Hello.. I just wanted to know if anyone can tell me how can I give my website visitors the feature of "FRIENDLY PRINTING" through IE. I would definitely like to give a feature like...
5
by: Darren DeCoste | last post by:
I have an access project with a Form that has a Command button to print the current record. I would like to Print the record 3 times, changing a text field on each print. The standard code of...
1
by: tangokilo | last post by:
Hi, Developping in VB. Net 2003 I am displaying data for 3 months on a datagrid and wish to color columns for 1st month lets say in gray, columns for 2nd month in blue, and columns for 3rd...
4
by: William LaMartin | last post by:
I have a vb.net win form where I want to output some text to a printer. Everything works fine when printing to my laser or inkjet printers. However when I print to the Acrobat PDFWriter printer...
2
by: Mitul | last post by:
Hello friends, I am getting stuck at a point in my project. I would like to give functionality of print data from site. but there is a problem is that if there are lots of data which takes...
9
by: Scott M | last post by:
I'm printing a directory of about 500 multi-page tifs to a high speed printer and the spooler process is killing me!!! here is a little code..... Public Function PrintImage(ByVal...
6
by: maradona | last post by:
Hi!!! Question 1! ======== I want to make a program to print in the screen the numbers from 1 to 10 with deferent colors .For example 1(white) 2(red) 3(yellow) 4(green) ...... Is that...
0
by: eye707 | last post by:
I have several different reports connected to a search form. I would like people to view the reports with different color backgrounds (which they already have), but I would like to know if I can set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.