Can someone provide me with the code to some C program that actually works. Or even the code to some C game such as the popular snake game, or tetris, etc. But please nothing that has to do with C++ or C#
@ganeshie8 , @hba , @eSpeX
There are plenty of examples of C code here: http://www.programmingsimplified.com/c-program-examples
Right, but they introduce the header file graphics.h, how do I implement this into my code?
Who introduced the header file and what code are you implementing?
Take a look at this link: http://www.programmingsimplified.com/c/program/draw-shapes They include conio.h and graphics.h. conio.h comes standard in visual studios, but when I include the graphics.h header file in the code, it gives my a compiler error.
If you read through their page on the graphics.h file you will see that it is a library included in the Turbo C compiler. The basic code examples work for all C as far as I know. You could look at the functions defined in their graphics.h and create your own header file.
Okay, so there is no such header file in visual studios?
None that is included in the standard libraries that I know of, though it might be under another name, you might try the gdigraphics.h file.
What i'm trying to say is, How would I run that exact same code that is found on: http://www.programmingsimplified.com/c/program/draw-shapes and get the same results. For some reason It won't let me copy that code into visual studio and execute it without errors.
Right, some of the functions called are included in that graphics.h file, if your compiler doesn't understand the request it will not compile.
Okay, I'll give that a try. I just noticed that you have to download an additional package for windows 7 graphics.
If you are a new programmer and interested in graphics, might I suggest you consider Java.
Thanks, I'll look into it.
Join our real-time social learning platform and learn together with your friends!