0

Why does it fail to run?

We use this code to create graphics in turbo C in school and i tried it in SoloLearn, it doesn't work. Where am i wrong? https://code.sololearn.com/c0703gEfy54a/?ref=app

30th Jan 2018, 9:39 PM
Learner Joshua
Learner Joshua - avatar
4 Answers
+ 10
You paste Turbo C code in a C# code, of course it doesn't work, syntactically extremely different. Besides, Turbo C is not following the latest standard, it is an outdated development tool, as much as possible try to avoid it. I understand your school might obliged you to use it, but I think you might want to read the following discussion, about Turbo C & why we should avoid it and leave it behind. https://www.sololearn.com/discuss/288609/?ref=app Hth, cmiiw
30th Jan 2018, 9:52 PM
Ipang
+ 4
Well first, you are trying to execute your code on the C# playground, which is a completely different language. Second, your main method lacks a return type (should be int). The biggest problem however, is that graphics.h is incredibly outdated and it's not a part of the C standard library. The graphics library you're including is part of the Borland BGI API, and you won't be able to use it here.
30th Jan 2018, 9:47 PM
SplittyDev
SplittyDev - avatar
+ 1
That's not C#. Looks more like C++.
30th Jan 2018, 9:47 PM
Bagshot
Bagshot - avatar
0
Thanks for the info kuya
30th Jan 2018, 9:49 PM
Learner Joshua
Learner Joshua - avatar