OpenGenus / cosmos

World's largest Contributor driven code dataset | Used in Quark Search Engine, @OpenGenus IQ, OpenGenus Visual Project
http://internship.opengenus.org
GNU General Public License v3.0
13.56k stars 3.68k forks source link

Some programs need to be updated to make them platform independent #2084

Open InfiniteCoder opened 6 years ago

InfiniteCoder commented 6 years ago

This is a(n):

Details:

Some programs are using legacy and platform dependent code, which make them less helpful for people who do not use those platforms. For example, Programs using conio.h. These need to be updated

abdouskamel commented 6 years ago

I think that in the case of conio, it's just about showing the results of calcutation or getting input from the user, it doesn't have a real impact on algorithms.

InfiniteCoder commented 6 years ago

@abdouskamel It is, but it makes the program unusable (at least out of the box) on most of the systems. Turbo C is an outdated compiler which should not be used anymore. So code should be written in a platform independent way, so that anyone who uses any of the recent compilers and systems, like gcc, should be able to run the program.

abdouskamel commented 6 years ago

Of course, you cannot copy/paste those programs and run them. I saw that most programs include conio.h just to get access to getch(). This is easy to fix.