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
-2
votes
2 answers

how to solve codeblocks unable to run a graphics c program properly

I had setup codeblocks for graphics programming. like I install winbgim file. and done other setup in the codeblocks linker setting. but when I ran a program like this #include #include #include main(void) { int…
Tushar Mia
  • 375
  • 2
  • 9
-2
votes
1 answer

Importing BMP file in Turboc++ issue:BMP file is not being displayed properly in the output screen

I am trying to import Anand.BMP file in the graphics window of TCPP, for this its source code is as follows (NOTE: I have not mentioned the header files in the source code): struct A { char type[2]; unsigned long size; unsigned short int…
Suresh
  • 141
  • 5
-2
votes
1 answer

Graphics (Rotation in 2D)

I am now trying for 8+ hours to solve this but cant figure it out, please help find whats wrong with my code. int main() { int gd = DETECT, gm; float ANGLE = 360/10 * M_PI/180; initgraph(&gd, &gm, NULL); int cx = getmaxx() / 2; …
Dpetrov
  • 546
  • 2
  • 5
  • 12
-2
votes
1 answer

How to resolve the undefined reference error to readimagefile in dev C++

I am getting an error in Dev C++ with the function readimagefile. It says 'undefined reference to readimagefile' whenever I try to use the function included in the header file 'graphics.h'. Here is my code to show an image: int main() { …
-2
votes
1 answer

Warning passing `double' for converting 2 of `void moveto(int, int)'

I got lot of those wanring in this program: Cannot figure out why, please help. The program works, it shows the graphics i need but i got those warnings starting with lines where is moveto and lineto Here is the full program: int main() { int…
-2
votes
1 answer

What can I use instead of #include in Mac Os?

The question is the same above. Since when I compile my C program it gives me a fatal error (graphics.h not found), I was wondering what I can use instead of it. Consider that I DO NOT WANT links to other sites or whatever, because I'm a newbie and…
Understanding
  • 119
  • 1
  • 1
  • 9
-2
votes
1 answer

Graphics header fails to compile?

I downloaded the graphics.h and libbgi.a files and did exactly as the instructions provided and still it doesn't work! I've set linker parameters as well and I must say that this works in C++ mode , but not in C mode. I'm using Dev-C++ 4.9.9.2 as…
Ben FM
  • 31
  • 8
-2
votes
1 answer

Graphics programs in Codeblocks

I've tried running and going through everything I can find on the net to fix the issue but it just doesn't work. So far I've done: Downloaded Codeblocks 13.12 (as well as tried with 16.01) with mingw setup. Added graphics.h and winbgi.h files to the…
Ramit Sawhney
  • 31
  • 1
  • 9
-2
votes
3 answers

printing a set containing strings on graphics.h in c++

I am trying to print the elements of a set containing strings on graphics.h console using outtext() function,but i get this error: cannot convert 'std::string {aka std::basic_string}' to 'char*' for argument '1' to 'void outtext(char*)'| this the…
user6207597
  • 13
  • 1
  • 3
-2
votes
1 answer

Acess violation upon using fopen to write to a file in VS2015

So im gonna make this very quick. Im trying to run a code that worked in codeblocks before but i really wanna get it to work in visual studio for personal reasons. This is the error: Exception thrown at 0x77EB9F83 (ntdll.dll) in bgi.exe: 0xC0000005:…
MoustacheSpy
  • 743
  • 1
  • 6
  • 27
-2
votes
2 answers

How can i display partly-transparent pictures in Graphics.h

For creating a small game for a competition in class we are using graphics.h I wanna make a small platformer and I need transparent backgrounds for the player sprites. How can i accomplish this? I am using visual studio 2015 community edition and…
MoustacheSpy
  • 743
  • 1
  • 6
  • 27
-2
votes
3 answers

Implementation of Line Drawing Algorithm doesn't work properly

First question, I have tried to calculate the expression, di+1=di+2*Δy−2*Δx(yi+1−yi) for the four quadrants. Irrespective of the quadrant, the expression was found to be the same, including signs. Am I right, or, there has been some mistakes in my…
user366312
  • 16,949
  • 65
  • 235
  • 452
-2
votes
3 answers

C C++ Graphics program in Linux

I have this program in C language: http://rajababuman.blogspot.com/p/graphics-in-turbo-c.html. It works fine if I use DOSBOX on my Win7 machine and using TurboC++ and shows me what it's doing. But, how can I run the following graphics program on a…
AKS
  • 16,482
  • 43
  • 166
  • 258
-2
votes
1 answer

Running Graphic C Program using Command Prompt

I'm trying to compile a program which draws a house using the Command Prompt in Windows 8 #include "graphics.h" int main(void) { drawRect(50,100,200,150); drawLine(50,100,150,25); drawLine(150,25,250,100); drawRect(130,190,40,60); …
KeykoYume
  • 33
  • 1
  • 3
  • 8
-2
votes
1 answer

linker errors in graphics.h in dev c++

I'm trying to learn the graphics program and when I close and reopen my file I get a message that says "[linker] error in.." referring to all the commands that refer to graphics.h. I am using windows 7 and I have downloaded the WIN BGI program onto…