winbgi

Drawing an arc in C++ Graphics.h

浪子不回头ぞ 提交于 2019-12-24 14:15:55
问题 I'm using graphics.h in order to start with a bit of graphic in C++, but when I run the code the program crash. I'm using CodeBlocks as a compiler and Windows 8.1 as an operating system. What should I do in order to make it works? Here is the code: #include <graphics.h> int main() { int gd = DETECT; int gm; initgraph(&gd, &gm, "C:\\TC\\BGI"); arc(200, 200, 0, 130, 50); getch(); closegraph(); } 回答1: "What should I do to make it works?" 1) Forget about graphics.h it is obsolete. 2) Get yourself

CodeBlocks error in graphics library

安稳与你 提交于 2019-12-08 04:07:13
问题 I executed the following code in codeblocks IDE- #include <iostream> #include <graphics.h> using namespace std; int main() { int gd = DETECT, gm; initgraph(&gd, &gm, "C:\TC\BGI"); line(100, 200, 150, 250); cout << "Hello world!" << endl; return 0; } and while debugging my code stopped at this point in graphics.h int left=0, int right=0, int right=INT_MAX, int bottom=INT_MAX, I have included the WinBGIm library. 回答1: Looks like issue with initialization of graphics driver. What is the output