Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes

C++ Programming Code Examples

Learn C++ Language

textcolor() Function in C++ Programming Language

textcolor() Function in C++
Use the textcolor function to define what color you want to use for text. You can use this function to vary the text colors of your output. Colors must be written in all caps, or expressed as a numeral. Now, if you want your text to blink then while calling the textcolor() function pass the color and also say BLINK. This will like this: textcolor(BLUE+BLINK).
Syntax for textcolor() Function in C++
void textcolor(int color);
specify the color Change the color of drawing text where color is a integer variable INT VALUES corresponding to Colors: • BLACK 0 • BLUE 1 • GREEN 2 • CYAN 3 • RED 4 • MAGENTA 5 • BROWN 6 • LIGHTGRAY 7 • DARKGRAY 8 • LIGHTBLUE 9 • LIGHTGREEN 10 • LIGHTCYAN 11 • LIGHTRED 12 • LIGHTMAGENTA 13 • YELLOW 14 • WHITE 15
/* In C++ programming, the background of the output screen is black and text color is in white color. We can color both the background and text color in the output screen. */ #include <stdio.h> #include <iostream> #include <conio.h> //this should be enough I guess using namespace std; string a; int main() { clrscr(); textcolor(2); gotoxy(3,3); textattr(4); cout << "This should be underlined?"; cout << endl; cout << "Wanna end this program? Press a key (Y) and then press enter.."; cin >> a; }

Algorithm takes the input of 'n' data element and prints all 'possible combination'. For that, it maintains a boolean 'Array of Length' "n". If the corresponding boolean value is true, then

This algorithm randomly assigns a number of vertexes and edges of the graph. It connects vertexes randomly & generates cyclic, acyclic or disconnected undirected graphs. Generate

Program display the minimum heap method of arranging elements. "Minimum Heap" is a method of "Arranging Elements" in a Binary search tree where value of the parent node is