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
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
+ 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.
+ 1
That's not C#. Looks more like C++.
0
Thanks for the info kuya