Jump to content
  • Advertisement
Sign in to follow this  
Moe091

How to learn c++ WELL for someone with programming experience

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

 

I'm not a newcomer to programming, I've been coding for a few years now and am pretty comfortable with it, I even do some freelance work making android apps when I can find jobs willing to pay more than $2/hour. However almost all my experience is in Java. I do know some VERY basic python/visual basic/ruby, and i used to know the fundamentals of c++ but that was a while ago and I don't remember anything. 

 

My goal right now is to improve as a programmer overall, and I think for me learning a new language, especially c++, would help me a lot in that way. It's hard for me to have a good broad understanding of programming when the only language I know is Java, I can't tell which things are just 'programming things' and which things are 'java things,' if that makes any sense to you. I think C++ would be good for me because many people claim learning c++ necessarily teaches you a lot about how programs and programming works in general and gives you a better understanding of lower level concepts. 

 

So right now I am looking for some awesome resources, primarily books(because with a nice big book I have at least a month worth of organized, properly ordered and cohesive lessons that I can follow. For me it's very important to have a strict structure for how I'm going to learn something and following a book from beginning to end is the best way to do that without paying for expensive courses. If left on my own to use various online resources I'll end up procrastinating and wasting time and never learning anything, that's just how it is). What I'm looking for most is a book that can give me the deepest and most thorough understanding of the language. I don't want one of those "Learn c++ in 24 hours" books or anything, I'm not in any kind of rush and I want to get as much as possible from my first c++ book. Let me put it this way, I want the book that will leave me with the best grasp on c++ once I've carefully went through the entire book page by page. It'd be nice if the book left out some things that I already know as a Java programmer, but I'd rather waste some time going over stuff that I already know in a beginner programmers book then save myself some time but ultimately miss out on what would've been a better book for my purposes. It doesn't have to be a book, I'd appreciate links to any kind of resource you think might be useful for me, but keep in mind what I said earlier about how I need a structured learning resource that I can force myself to follow so that I don't waste a ton of time messing around glazing over tons of different resources but not really following through with any of them. I guess online college courses like the ones at ocw.mit.edu would be great for me as well, if you know of anything like that that could replace or supplement a good c++ book let me know!

 

 

Okay thanks for the help everyone. If you have any other tips relevant to my situation I'd love to here them, anything that will help me learn more or learn faster.

 

 

Share this post


Link to post
Share on other sites
Advertisement


I think C++ would be good for me because many people claim learning c++ necessarily teaches you a lot about how programs and programming works in general and gives you a better understanding of lower level concepts.
Indeed, once you know C/C++ you can easily learn any language almost instantly :) For example PHP is C++ with typeless variables and where you can get away with dividing by zero.

Also some low level concepts (like bit operators) are hard to learn by studying other languages since, for some reason, C/C++ books are the only one that teach it (at the first few pages).

 

Anyway, if you know Java already you should have no trouble mastering it.

 

Actually, in your case maybe you should start with some book for C? I mean, since you use Java you already know OOP and the differences are not that big in that area. What you miss is allocation of memory (doing it without garbage collector), bit operators and other most low level stuff (which is best covered in books for C I suppose).

Share this post


Link to post
Share on other sites

Since you already know java and have done some 'real world' applications, learning c++ shouldn't be too much of a hassle. I think the thing you'll spend the most time on will be memory management (pointers, RAII, stuff like that). If you're not averse to making console applications I wholeheartedly recommend you pick up "accelerated c++". It will give you a solid foundation and shouldn't take very long considering you already know the basic stuff.

 

note: I don't think this book has been updated so after you've read it you'll probably want to teach yourself the new c++ standard. After that read some win32 tutorials if you want to get into GUI stuff. There's some pretty decent ones floating around the web so I don't think a book will be necessary in this case (assuming you're on windows otherwise you'll want to look into QT).

Share this post


Link to post
Share on other sites

My favorite book when I just started c++ was c++ primer - he has released a new version with c++ 11 standards

 

http://www.amazon.com/Primer-5th-Edition-Stanley-Lippman/dp/0321714113

 

That's also nice because I think it has a kindle version if your in to that sort of thing.. The book includes end of chapter exercises which are helpful

 

I would recommend after completing that book learning GUI programming for either Java or C++ - I don't know about Java but Qt is great for c++ - here is a book that helped me learn it pretty well

 

http://amzn.com/0132354160

 

http://amzn.com/0321635906

 

I own both books and read them in the order listed - from them I have made multiple full scale GUI applications

Share this post


Link to post
Share on other sites


After the basics you might try Code Complete, which is a great read for any programmer, offering practical tips for real world coding.

++

Share this post


Link to post
Share on other sites

Thanks a lot everyone, C++ primer and accelerated c++ where the 2 books I was considering based on my own research actually. I still don't know which one I'm going with, I like that c++ primer has a new edition out with c++ 11. I don't know much about c++ 11 yet, do you guys think it'd be best to go straight for c++ 11 or is there any value in learning old c++ yet. Also if anyone feels like it I could use a brief explanation of what c++ 11 is for someone who basically just thinks of it as "That new c++ thing that people talk about a lot." 

 

Your advice was really helpful, I think I'm going to get a copy of c++ primer(still considering accelerated c++ though if anyone else wants to argue in its favor) and check out learncpp.com. 

 

sorry one more quick side question, as a self taught programmer I lack a lot of knowledge in stuff like algorithms, discrete maths(whatever that means..), compilers, and all the theoretical stuff. I feel like I'm at a point where it'd be pretty useful for me to learn this, does anyone wanna make a case for/against learning this stuff alongside c++ if my goal is to just become a better programmer? what things specifically would you recommend I focus on first? and do you know of any good resources for a self-taught programmer on an almost non existent budget to learn this stuff? I remember seeing a free online class from either mit or stanford that taught algorithms and c++ together so I'm probably going to look into that, last time I got bored and gave up on it early but I have a bit more discipline now hopefully I can manage to stick with it(motivation is my main obstacle in learning new things, not comprehension).

 

 

Thanks again everyone!

Share this post


Link to post
Share on other sites

You can pick c++ primer, it's no skin off my nose smile.png

 

C++11 is an extension of the standard library and core language. There may be some value in working with old style c++ if you're working on an outdated compiler that doesn't support it yet but I wouldn't worry too much about it and just go for 11. You'll need to switch over eventually so why not get ahead of all those lazy buggers like me that have yet to teach ourselves the new standard.

 

If you want to become a better programmer learning about maths and compilers is great, but before you jump into that stuff I recommend that you get acquainted with design patterns first. If you want to become a professional coder you can be damn sure that you'll need to know them eventually. If you still want to brush up on maths http://www.khanacademy.org is a pretty cool place to do it. If you're thinking "screw you molehill mountaineer! I want to learn computer science" then check out mit opencourseware's computer science section at http://ocw.mit.edu/courses/#electrical-engineering-and-computer-science

You'll have to do some clicking around but the lecture video's are in there. Nowadays there's a lot of great stuff you can find on youtube as well - you are limited only by your curiosity and motivation to learn. Enjoy!

 

EDIT: here's the computer science course in a youtube playlist:

 

ps: discrete maths means mathematics with discrete values (1 car, 2 cars ,3 cars, ... nothing in between) as opposed to continuous values such as the height of a person (between 1 meter and two meters there are an infinite amount of measurements you can make such as 1,00000000002 meters).

Edited by molehill mountaineer

Share this post


Link to post
Share on other sites

I'd recommend getting the C++ Primer and The C++ Standard Library:  A Tutorial and Reference.  The second is entirely focused on the C++ STL.

 

Discrete Math and Linear Algebra are a couple subjects I think are very useful for just about any programmer to have under their belt.  Discrete Math is the foundation of topics like Cryptography, Hashing, Graph Theory, Modular math, etc.  On a tangent, once you're familiar with Modular math, you'll discover that at least half of all card tricks are just a form of Modular math (the other half being slight of hand).  Linear Algebra is basically matrix math.  Well... that's a bit of an oversimplification, but if you're going to be working in 2D and 3D environments, Linear Algebra will be indispensable.

Share this post


Link to post
Share on other sites

Start off by cultivating a powerful and all-consuming anxiety that whatever you just wrote is wrong in some way. Make sure that this anxiety is unquenchable, and very nearly debilitating. Remember, if you question everything you do you're much more likely to gravitate toward better solutions.

 

This is my system. Send help.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!