What is the replacement for graph.h in the current version of C or C++?

Viewed 378

I am working on a legacy program written in C. It is a 16 bit program. I was able to open it into Visual Studio 2019 but when I tried to compile it is giving me an error "Cannot open source file "graph.h". Similar error I have received for "bios.h" and "sound.h". Is there any other header library I can replace to achieve same functionality of graph.h, bios.h and sound.h.

1 Answers

Assuming you mean graphics.h, bios.h and sound.h, these were MS DOS libaries provided by Borland in the year 1989. graphics.h specifically was used for the old Borland MS DOS graphics library "BGI". sound.h was made to activate the "PC speaker" buzzer, used to scare away carnivore dinosaurs. These libs don't exist outside old Borland DOS compilers.

To run this ancient crap, you need a MS DOS computer with Turbo C. Or an emulator that can simulate them. If you surf the internet, there's lots of strange people putting lots of effort into getting such emulators up and running on computers made this millennium.

I would however recommend to forget all about MS DOS programming, because there is absolutely nothing to learn from running this old stuff. You should study modern tools and libraries instead, the kind that are actually used in the real world.

Related