• Advertisement
Sign in to follow this  

Need help beginning with C++

This topic is 3876 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

Hello all, I am new to this forum, and new to C++ aswell. Actually, I haven't started yet, I am a true newbie who doesn't know ANYTHING yet. The thing is: I don't know where to start! Could anyone help me getting started? What should I do to get started: What book should I buy, what course should I take, does anybody know what's the best way to get started. And please don't answer with: Take one of the online tutorials. I really don't like the online tutorials, nor do I like books that give bad information. My head can get messed up when getting bad, lack of or bad quality information, so please only give me the information that you think is best to get started. I'd like to have the name of a book or the name of a course or whatever. I hope that someone can give me concrete information on what I should take to get the most benefit out of my time learning C++. I got 4 years to learn it. After that I'm going to follow a study in C++ game programming, which will take approximately 3 to 4 years. So I got quite some time to learn C++. I don't want any answers like "7 years are not enough" or "go seek it out for yourself" or any other 'lacking usefull information' reply. I already told you why I am asking if you read above. I will check tomorrow, hope I find anything usefull. Thanks. Marlon. EDIT: I forgotten to say I don't mind spending some money on it, since I see it as my future. [Edited by - Marly on June 11, 2007 3:47:03 PM]

Share this post


Link to post
Share on other sites
Advertisement
If you insist on doing C++ programming, I'd recommend 'Beginning C++ Game Programming', though I'd never recommend a language like C++ to anybody who's just beginning unless I know the person likes pain and suffering, and lots of cursing (though it depends).

The most important thing is to learn concepts and -- here of course -- game programming concepts, tricks, etc. Syntax is just syntax easily learnt; what you can do with it is key. Therefore a language like C++ is not suitable for its syntax is very unnatural ---> I'd say use (Free)Pascal instead (-- plain Pascal, Object Pascal).

Or another option is Python. If you're more of an adventurer, I'd say have a try at Haskell or even Prolog, heh heh :) (but you shouldn't touch them yet).

Share this post


Link to post
Share on other sites
Learning C++ syntax and programming concepts simultaneously is without a doubt a challenging process, but definitely a doable one. In any case, you might want to consider a language with lighter syntax, such as Python. This will enable you to avoid numerous hours of debugging that could be spent on actual problem solving. That said, here are a few personal recommendations:


Alternatively, you can download the Thinking in C++ series for free, which are also very helpful. When you are done with these, you might want to read the Effective C++ series, as well as this excellent reference on the Standard Template Library.
Quote:
Original post by Bijo
If you insist on doing C++ programming, I'd recommend Beginning C++ Game Programming

I haven't read this, but, in my opinion, you should focus on general programming before tackling games.

Hope this helps.

Share this post


Link to post
Share on other sites
I'm willing to do anything to be able to learn it. No matter how much time it takes or how many stress comes with it.

Why does everybody like another thing? Why can't there be one best thing for learning C++, like WoW is in the MMORPG industry.

Can anybody tell me what the best book is for learning C++. What book is best to learn all the beginnings?

I hope I get more of the same answers.

Share this post


Link to post
Share on other sites
There is no something like the best source of information. And if WoW would be that great there would be no other mmorpg's, yet there are ;).
The only book i know that everyone likes is "Introduction to Algorithms" by Cormen. If you want to learn c++ you may want to buy this book someday, but since it's about algorithms it's not really the total begginer thing.
For a Conclusion don't ask for the best of the best thing, since it's based on people prefernces. If it would exist, why would we need any other's?

Sorry for my crappy english ;)

Share this post


Link to post
Share on other sites
Helping a very beginner -- who has no knowledge at all of programming in any sense -- to start learning C++ and directing him towards it is like sending a man to hell :P

While learning C++ and programming as a first encounter is indeed doable the fact remains it's still unnecessarily complex with all the C++ pitfalls and annoyances. And I see no reason why a beginner shouldn't learn Pascal, unless he perhaps wants to be... "cool"?

There's this thing that's said: anybody who will do C++ is either forced by necessity, ignorant, or a masochist (or a valid possible combination thereof).


Marly, if you want to go and learn C++ then go ahead. Nobody will stop you (besides me of course :P) and C++ is the mainstream language for games anyway. Getting used to it will probably be beneficial in the future. But do know there are -- better -- alternatives such as Pascal or Python.

Share this post


Link to post
Share on other sites
I have found this book: http://www.acceleratedcpp.com/ . It seems to be good and my teacher in C++ also told me this book would be a good choice.

Think I'm going to take this one then.

Share this post


Link to post
Share on other sites
Quote:

I will check tomorrow, hope I find anything usefull.


Useful has one 'l', not two.

Apart from that, the idea of basing my career on something I don't know ANYTHING about, even given 4 years, sounds a bit dubious. Who says you're going to enjoy it?

I don't think the problem is learning C++, that's easy enough (if you're good at mathematics you shouldn't be too terrible at programming). I think this, as a career choice, is viable, but who knows what you're going to be like 7-8 years from now?

Just thought you might need another person to say "Are you sure?"; if you want to be questioned again just try and close something quickly so your boss doesn't see. :-)

Share this post


Link to post
Share on other sites
Learning c++ as a first language is not impossible, I know many who have done it and are successfully programming mainstream software. However if you ask them how difficult it was to learn programming concepts along with the c++ syntax, they will tell you it was VERY very difficult. I love c++ its the language I use most of the time, but I started with Java and Basic. Pascal is another good starting language (as many have already said).

The biggest problem I see with starting with c++ is the fact that the syntax is so very unnatural when you look at it. Not to mention the "advanced capabilities" that come with the language such as memory management. I would never recommend c++ as a first language, but if you are truly motivated and driven to learn it, then you can be successful. Just remember to always be patient, open-minded, and willing to always learn more, because you have got a long road ahead if you want to be successful in programming, no matter what language you start with.

Share this post


Link to post
Share on other sites
If you are really serious about programming for a career then you should really consider doing a University course in Computer Science. Very few companies will employ you without a degree. All the books mentioned by Darklighter are seconded by me.

However, I also agree with the others that C++ is not the ideal beginner's language and you be better off starting in a higher level language such as Python and then moving onto C++ at a later stage when you have a good hold on programming concepts.

Share this post


Link to post
Share on other sites
I don't know why people see c++ as so difficult language.. I don't know a simple thing about any other languages then c or c++( well i know a bit of brainfuck but that doesn't count i think ;) ). If you want to make only some small games,just for fun i guess python will do, but if you want to work in the industry(and i got impression you want) you will have to learn c++ eventually.
But one advice you don't know how hard programming is, until you will spend 6 hours on debugging piece of code which simply refuses to work for unknown reasons;)
That's were battle for becoming a programmer starts: will you be patient and last till you fix it, or will you give up?
Until that very moment saying you can work hard is pointless;)

edit:
7 years it's a looong time, maybe you should consider learning D straight away? ;)

Share this post


Link to post
Share on other sites
I learned fairly quickly from this book after trying and failing from numerous others. I suppose it depends on the style of writing you prefer (personally I can't abide those Dummies-style books where the author forces his humour on you).

I found learning C++ relatively painless, but I was already familiar with a lot of programming constructs from using Basic.

I learnt the basics of C++ in around 3 months. But learning a language is insignificant compared to what goes with it. The language itself is simply a tool to be used. The real meat of learning to programming is concerned with algorithms, design patterns, architecture etc. This is why most university courses (in the UK at least) don't teach you much programming - you're left to teach yourself.

Share this post


Link to post
Share on other sites
When I was 14, I decided to learn to program games. Back then, 1992-1993, my options were pretty much C/C++.

After doing few "printf and scanf" exercises, I immediately started to try to make a game. Back then, no DX, no OpenGL for me. It was Mode13 using BIOS to do 320x200 256 color graphics. I found a lib (FastGraph) and away I went.

It is not impossible nor is it even daunting. One suggestion would be, make some very short term goals. Do not embark on making Super Mario Bros. clone. That is way too much. Also, do not do 3D at this time at all. 3D adds complexity that you should not even bother with.

1. Get Microsoft Visual C++ Express, DirectX SDK, and Windows Platform SDK

2. Get one of those "Program C++ in 24 hours" or "C++ for Dummies" books. That will get you started. Do the examples there and compile the code. These books are great if you know nothing. But are pretty much useless after 12 hours.

3. Get a nice reference book. Not a step by step, but something where you can look up std::list and find out how to use it. Personally I use C++ Primer Plus 5th Ed. Some like, some don't. It does the trick for me.

4. Get a good site on the web to find info. I use google... I type: "C++ std::list" and do research.

5. Get yourself HGE lib to handle 2D games. HGE is great cause it won't bog you down with DX crap.

And practice. It will be very frustrating. In C++, many times the bug is not where it seems. It is very important you understand what a pointer is, what a reference is, and how objects are created and destroyed. If you don't, you will have odd bugs you will not be able to find.

But it is very possible and not that difficult. It will just take commitment. C++ is a frustrating language even to the experts. The thing that is simply great about C++ is the support. From the forums, to books, to the billions lines of code that can pretty much take care of anything you need.

The foundation is important here. If you skip over memory management (pointers, heap vs sack, etc) you will be in big trouble very soon. Many other concepts, pretty much the same as in any other language.

Share this post


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

  • Advertisement