C/c compiler
Expert: Joydeep Bhattacharya - 2/26/2007
Question
Hi,
Thank you so much for your help with finding a c compiler for me. I used the Turbo C to compile some programs that I found form the internet (
http://www.c.happycodings.com/Games_and_Graphics/index.html) and Turbo C was unable to compile these codes. It always finds many errors with the codes. Is it possible that Turbo C (being an old program) uses common C whereas these codes are written in ANSI C. What other reasons could cause that problem?
Thanks a lot.
Eric
-------------------------------------------
The text above is a follow-up to ...
-----Question-----
Hi,
How are you?
I'm only beginning to learn programming in C. I was wondering if you could suggest a free C compiler that could be downloaded from the internet. I don't know which one to prefer. I have two computers: one is running Win98se, the other one is WinXP. Thank you in advance for your advice.
Eric
-----Answer-----
Hi Eric
If you are new to C/C++ I guess its great to get started with Turbo C/C++ you can also refer to
http://www.scodz.com its a good site for new C/C++ programmers from where u can also download Turbo C/C++ compiler. In case of any help you can get back to me. Its a free website just get your self registered.
regards
Joydeep Bhattacharya
AnswerHi Eric
Have you modified the code or just copy pasted it and executed it ...
If you have just copy pasted and executed it, then you may end up with errors because the BGI path is not set in the program. Try having a look at this line
initgraph(&gd,&gm,"");
The third parameter of this function is the path to the BGI file it would look something like this
initgraph(&gd,&gm,"c:\\tc\\bgi");
And if you have already done this and still stuck with some error then lemme know in which program you are stuck i mean the path of the program in the site you mentioned and what the errors are.
Please do come back with a feedback. All the best
regards
Joydeep Bhattacharya