Hi,i need help to convert this simple game from C++ code to C..
Blockbreak-lin.tar.gz
Please help!!
Hi,i need help to convert this simple game from C++ code to C..
Blockbreak-lin.tar.gz
Please help!!
You don't "need help", you want someone to do it for you.
And good luck finding someone that'll do that for free.
I have moved this thread to the Projects and Job Recruitment forum.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Given that it's 90% C code to begin with (no C++ classes to make it an interesting exercise) it should be easy enough for most people with basic skills to attempt.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
The question is why would you even want to do that?
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
Im new to C,sdl and i dont know c++,every tutorial like this game that i found is written in c++.
My oh my, yet another young developer that plans to learn programming by writing an operating system.
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
Does anyone want to convert this?
What's wrong with trying it yourself?
It would take 1/2 a day to just to a bit of research on the bit that is genuinely C++ to get the general idea of what it does. Hell, you could even put some print statements in there and figure it out through observation. Replace that code with some works-the-same C and you're done.
If you ever hope to write your own code, you owe it to yourself to at least TRY this yourself.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.