Questions tagged [bgi]

Borland graphics interface (graphics.h) is a legacy library for 2D graphics similar to nowadays GDI.

Borland graphics interface (graphics.h)

  • is an old legacy library for 2D graphics similar to nowadays
  • was widely used with Borland IDE's like Turbo Pascal or Turbo C++
  • is still used in some schools
392 questions
1
vote
5 answers

C Graphics Library Error

I have the following code : #include #include #include #include void main() { int gd=DETECT,gm; int dx,dy,p,end; float x1,x2,y1,y2,x,y; initgraph(&gd,&gm,""); printf("\nEnter the value of…
Ant's
  • 13,545
  • 27
  • 98
  • 148
1
vote
1 answer

VCPKG, not a found command right after installing it?

I am trying to use #include in visual studio code to display graphics in C. When I used graphics.h as a header the following error occurred, #include errors detected. Please update your includePath. Squiggles are disabled for this…
Nathan Tolley
  • 33
  • 2
  • 6
1
vote
0 answers

Graphics in devc++

After reading many previous answers on the same topic, I was finally able to run a graphic code on my machine. If I give constant values to axis and radius, circle is drawn but not a complete circle. Please let me know what is wrong with this…
Shehzad Adeel
  • 113
  • 1
  • 1
  • 6
1
vote
0 answers

data is not able to read in the c program

#include #include #include #include typedef struct arr_col_1{ int x; }; typedef struct arr_col_2{ int x, y; }; typedef struct array{ int x1, y1; }; void col_1(FILE *file, int row); void…
1
vote
1 answer

This is a computer graphics code for 2D rotation in TURBO C++. It compiles fine but I can't run it. What should I do?

The code below compiles fine but I cant run it on TURBO C++. The runtime screen just flashes. But i have also used getch(). I dont know where I am going wrong. What should I…
1
vote
2 answers

How to convert a double variable into a char array?

I'm working on a project for school, and we just found out that outtextxy() (a function from graphics.h, which we must use) requires as the text parameter a char array. Here is its declaration: void outtextxy (int x, int y, char *textstring) The…
1
vote
1 answer

graphics.h gives no output

#include #include int main() { int gd = DETECT, gm; initgraph(&gd,&gm, ""); for (int i=200;i<400;i=i+25) { for (int j=200;j<400;j=j+25) { circle(i,j,100); } } …
user14472485
1
vote
0 answers

B-spline curve with graphics.h c++

I am trying to draw a curve with B-spline. I did my research about what is B-spline and how can I use it in a program algorithm. After all that stuff, I finally find a code to make this right in Stack Overflow. I made some changes on this code and…
1
vote
0 answers

How can I draw a spline curves with c in codeblocks?

I am trying to draw a minimum enclosing circle and I need spline curves for points. but also I shouldn't use libraries. For preview, I used lines but they need curves. How can I fix it? Which one is true arc, line or points? #include…
1
vote
0 answers

Would anyone know how to fix this conflicting types error im having on GCC while trying to use on linux?

I keep getting this error as i try to run my program colour.c whilst using , the error is: In file included from colour.c:3: /usr/include/curses.h:911:28: error: conflicting types for ‘getmaxx’ 911 | extern NCURSES_EXPORT(int) getmaxx…
1
vote
2 answers

compiler error when trying to show text using winbgi

I have a string that I want to show on the winbgi window using outtextxy. The problem is outtextxy only takes the pointer of a char array which shows a compiler error. Here is the code for(int i=0;i<13;i++){ setcolor(RED); …
AidenFive
  • 29
  • 1
  • 7
1
vote
0 answers

8-Way Color Filling Algorithm for a Circle leaks out of the boundary

My goal was to create an efficient version of flood fill polygon filling algorithm. The code works correctly for filling rectangles but for some reason it jumps out of the circle while filling the South-East Pixels. The disadvantage of flood fill…
1
vote
2 answers

How to completely overwrite output in c

So I am working on this side project game kinda thing, and I want to put it inside of a border/box. I then want to print text constantly inside that border: adding text, removing it, changing it etc. I've looked far and wide, and cannot find anyway…
Ryan Keough
  • 121
  • 1
  • 8
1
vote
1 answer

Why don't online C++ IDEs support "graphics.h" header file?

I tried compiling code using several IDEs of C++ using "graphics.h" header file using the list in TechGeekBuzz: Best C++ Online Compiler but they flag the error 1:21: fatal error: graphics.h: No such file or directory The program I am trying to…
Hilary Diaz
  • 39
  • 1
  • 6
1
vote
1 answer

Why is winbgi function settextstyle() occupying memory on the heap?

I am making a snake game in C using winbgi library. I have a problem with function settextstyle(). Every call of function adds memory to the heap (about 50kb). I have to use this function in loop, so at some point the heap starts to overflow. Is…
Michu01
  • 15
  • 3