Jump to content
  • Advertisement
Sign in to follow this  
stein102

having a hard time learning C++

This topic is 1956 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 come from a java background, and am honestly having the hardest time learning C++. I'm using the tutorial at learncpp.com and I find that I'm not retaining most of the information I've read. Everything seems so weird in C++ as opposed to java which I find to be very straight forward. C++ feels all jumbled and messed up, and I can't do a lot of the things I can do in Java (or haven't learned how to do it yet).

 

I feel like I have to invest a lot of time just to learn how to do something that should be really simple, such as inheritance (which I found really easy in Java).

 

I just want to get to the same level I was in Java, but this task is a lot more daunting than I originally assumed.

 

Any tips?

Share this post


Link to post
Share on other sites
Advertisement

I come from a java background, and am honestly having the hardest time learning C++. I'm using the tutorial at learncpp.com and I find that I'm not retaining most of the information I've read. Everything seems so weird in C++ as opposed to java which I find to be very straight forward. C++ feels all jumbled and messed up, and I can't do a lot of the things I can do in Java (or haven't learned how to do it yet).

 

I feel like I have to invest a lot of time just to learn how to do something that should be really simple, such as inheritance (which I found really easy in Java).

 

I just want to get to the same level I was in Java, but this task is a lot more daunting than I originally assumed.

 

Any tips?

 

I recommend Bruce Eckel's free-to-download "Thinking in C++" books. Great content, good explanations - deep enough to clarify but not enough to lose focus - and good exercises. Sure, a bit old, but all code works (I ran most examples and solved most exercises with gcc and clang) and it won't stop you from learning C++11 after you've mastered the basics - actually, it will provide you with a solid base for C++11. Read Vol. 1 and do all exercises. Worth every second you spend on it.

Share this post


Link to post
Share on other sites

I come from a java background, and am honestly having the hardest time learning C++. I'm using the tutorial at learncpp.com and I find that I'm not retaining most of the information I've read. Everything seems so weird in C++ as opposed to java which I find to be very straight forward. C++ feels all jumbled and messed up, and I can't do a lot of the things I can do in Java (or haven't learned how to do it yet).

 

I feel like I have to invest a lot of time just to learn how to do something that should be really simple, such as inheritance (which I found really easy in Java).

 

I just want to get to the same level I was in Java, but this task is a lot more daunting than I originally assumed.

 

Any tips?

 

I recommend Bruce Eckel's free-to-download "Thinking in C++" books. Great content, good explanations - deep enough to clarify but not enough to lose focus - and good exercises. Sure, a bit old, but all code works (I ran most examples and solved most exercises with gcc and clang) and it won't stop you from learning C++11 after you've mastered the basics - actually, it will provide you with a solid base for C++11. Read Vol. 1 and do all exercises. Worth every second you spend on it.

+1

I also came from a java background and  found it easy learning from that book

If you aren't already, use an ide like code::blocks. It will make your life easier

Share this post


Link to post
Share on other sites

Any tips?

 

Do projects instead of just coding aimlessly. That will work.

 

"C++ feels all jumbled and messed up"
 

Maybe it feels that way but its not:)

Share this post


Link to post
Share on other sites

Please don't use this [thenewboston] as your only source to learn C++ from as he leaves out information in his tutorials especially around the inheritance, virtual functions and polymorphism section.

He doesn't just leave out information, he's also outright incorrect at points.  A lot of beginners seem to find TheNewBoston's videos valuable and easy to follow, and so I've always taken the stance that I won't outright recommend not using them -- but you should definitely be using other resources as well to correct any mistakes and fill in the blanks.

 

 

Like the above, I would strongly recommend more practice -- things will stick with you once you're actually using them.  It can be frustrating moving from an easier language to something lower-level where you aren't able to do the same things as easily, but you'll get it if you persist. smile.png

Share this post


Link to post
Share on other sites

I'm surprised nobody mentioned The Famous C++ FAQ - http://www.parashift.com/c++-faq/

 

Over the years, I fond it to be an invaluable resource to refresh the knowledge (before an Interview) and connect all dots - with only a few lines/paragraphs of text (instead of 10 pages in some book).

 

Once you can answer all those questions, it will mean that you understand the design and implementation of the language, and you will be a master of C++  - of course, for that level of knowledge, you will need to go through many books - Design Patterns, STL, Template Metaprogramming, ...

 

I'm not sure I'd recommend Bruce Eckel's Thinking in C++ at this early stage, though. It's a pretty heavy read that is best to enjoy once you have a basic grasp on the most basic low-level C++ concepts like pointers, virtual methods and templates (and no, Java exp. doesn't really count here).

 

And that's before we even touch the subject of C++11....

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!