When I declare the <graphics.h> header file in a C language file, Repl reports that it doesn’t exist. When I do the same in a C++ language file, Repl returns “Hello World.” in the console and does nothing else.
I had expected the <graphics.h> header file to work in C and C++. This did not happen, as you can see above.
The code I used for C++ is this:
#include <graphics.h>
#include <stdio.h>
#include <conio.h>
void main()
{
int gd = DETECT, gm;
clrscr();
initgraph(&gd, &gm, “C:\TURBOC3\BGI”);
setcolor(BLUE);
rectangle(50,50,100,100);
getch();
closegraph();
}
The code I used for C is this:
#include <graphics.h>
#include <stdio.h>
This bug occurred on a Chromebook in the Chrome browser.
Thank you!