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

closegraph() Function in C++ Programming Language

closegraph() Function in C++
The header file graphics.h contains closegraph() function which closes the graphics mode, deallocates all memory allocated by graphics system and restores the screen to the mode it was in before you called initgraph. closegraph() function is used to re-enter in the text mode and exit from the graphics mode. If you want to use both text mode and graphics mode in the program then you have to use both initgraph() and closegraph() function in the program. This function deallocates all memory allocated by graphics system and restores the screen to that mode in which it was presented before you called the initgraph() function.
Syntax for closegraph() Function in C++
#include <graphics.h> void closegraph();
This function does not return any value.
/* closes the graphics mode, deallocates all memory allocated by graphics system and restores the screen to the mode it was in before you called initgraph by closegraph function code example. */ #include <graphics.h> int main() { int gdrive, gmode; char *drvpath = "c:\\bc\\bgi"; detectgraph(&gdrive, &gmode); initgraph(&gdrive, &gmode, drvpath); setbkcolor(0); setcolor(2); cleardevice(); MyOwnFan(320, 230, 0); getch(); closegraph(); return 0; }

"Linear extension" is another term for finding topological sort of a graph. A C++ program to print topological sorting of a DAG. Pointer to an array containing adjacency listsList. Graph










'C++ Program' to Check if a Point d lies inside or outside a circle defined by Points a, b, c in a 'Plane'. For any point t (xt, yt) on the plane, its position with respect to the circle defined