Jump to content
  • Advertisement
Sign in to follow this  
chigga102

Do i learn C or C++?

This topic is 4389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know there is a thing that is on here but it doesnt go into much detail. i want to start programming and want to make games and only games so i want to know what language i should learn. I want to program football(soccer) games and want to know if i can do it with C and if C++ can u direct me to where i can learn C++ through videos for free thanks.

Share this post


Link to post
Share on other sites
Advertisement
I would learn C quite well, to get used to the syntax, then go for C++.

Share this post


Link to post
Share on other sites
If you want to make games for the love of making games, I suggest C#.
If you want to make games to do this sort of thing professionally, then C++.

For free videos, go to Google.com or Microsoft.com. They have plenty of video tutorials and online text tutorial ready to be watched/read.

Share this post


Link to post
Share on other sites
Usually, when you learn C++, you will learn C as well. But the standards for C++ are different, and C++ uses a lot of functions not available in pure C. I started with C++, but still used some C code. But you may want to do as Dave said, and start with C first, to get used to the syntax. =)

Share this post


Link to post
Share on other sites
C++, you'll spend way to much time coding games at what you're shooting for in C. I would recommend that you actually just skip to C#, it's "easier," and a higher level language.

Share this post


Link to post
Share on other sites
There is no reason for a non-professional to specifically learn C over C++ ... it just doesn't make sense to cut off your own hands (no const, strange requirements to typedef a struct to actually use it cleanly, no virtual, no templates, no STL, C gets no love from me anymore).

About the only good thing about C is that since people can't do things like operator overloading or copy constructors, it is harder for them to design bad libraries that hide their badness from you.

And C is a GREAT language to explore for learning the core ideas of the entire von neuman machine (every modern CPU really)

Share this post


Link to post
Share on other sites
I'd say start with C++ and get into object oriented programming as soon as you can. Learning the right way to program in the beginning will ensure that you learn things that you'll actually be using later on. If the C++ standard template library is available, use it! Learning the wrong way to program will give you some pretty horrible coding habbits, so be careful.

Get yourself a good book and read through it chapter by chapter only coming to the computer when you're asked to do an exercise or want to try something out.

Share this post


Link to post
Share on other sites
Very Very simple.

I say, forget about C all together and learn C++.

Someone correct me if I'm wrong but I think there is some stuff you can do in C which is illegal to do in C++.

I Think in C these are legal



// No prototype for this function
int GetNumber()
{
number=getch();
//.
//.
//.
return number;
}


// Implicit int return
GetNumber()
{
//.
//.
//.
}


I think there are others but I can't think of them now

Share this post


Link to post
Share on other sites
The only problem with learning C++ first is that you'll never want to program in C.

If you decide to learn C first, you can appreciate what C++ offers and understand the history a little bit better (not that I recommend this path).

If this is basically your first language, I agree that maybe going C#, Java, Python, etc. is better.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!