#includeint main() { initwindow(640, 480); // creates a 640x480 graphics window rectangle(100, 100, 200, 200); // draws a rectangle at x=100, y=100 with width and height of 100 setlinestyle(SOLID_LINE, 0, 3); // sets the line style to solid with a thickness of 3 setcolor(RED); // sets the outline color to red setfillstyle(SOLID_FILL, YELLOW); // sets the fill style to solid with a yellow color rectangle(100, 100, 200, 200); // redraws the rectangle with the new attributes getch(); // waits for a key press before closing the window closegraph(); // closes the graphics window return 0; }
#includeIn summary, Frame BoxCrd is a C++ package library that allows easy creation and manipulation of graphical windows with basic shapes and text. The examples above demonstrate how to draw shapes, change colors and add text to a window.int main() { initwindow(640, 480); // creates a 640x480 graphics window outtextxy(100, 100, "Hello, World!"); // prints "Hello, World!" at x=100, y=100 getch(); // waits for a key press before closing the window closegraph(); // closes the graphics window return 0; }