I’ve been coding in Java and C# for about 4-5 months now. Great languages, but I feel like I’m really ready to take the next step. I’m anxious to begin learning c++, and I’ve already started to do so, but I’m admittedly having a hard time with it. It really does take a lot more effort to learn and accomplish anything when using it, and I feel like I’m really going nowhere. What should I do? Should I just continue programming with Java? Please, if this is the case give a good reason for this: I honestly would rather learn C++ because of what it forces me to do, and also of what I can learn in the process.
If I should continue with C++, the question here is…where should I start? Most of the tutorials I’ve been looking at (Memory Pools, XML Parsing, etc.) is all stuff which has gone way in and over my head.
I also run Linux only, so as far as any .NET goes, it’s pretty much limited to MonoDevelop 2.4.
IMHO, the best way to learn a new language is with a “pet project”.
You will make mistakes, your code will be a mess, and you will look back at your mess and realize that you should throw the whole thing away. BUT, you were excited with every incremental feature, and you enjoyed the “pet project” to the point where you could visualize it take shape. It can serve as a good “straw-man” model to be the externally observable characteristics a useful system for when you start it again.
For C++, write a program that translates music scales up-or-down. Generate a role-playing-game character. Create a text adventure game. There are zillions of options, but if you want to learn the language, and not a GUI library, then I’d stay with a command-line processing tool.
IMHO, C++ is a great way to think about how the computer works, and every design option is available to you. I use many languages regularly, but C++ is one of my favorites, so I would (with bias) recommend you keep with your study of C++.
[UPDATE] Again, my bias, but IMHO if you are learning C++, then learn C++. You may not want to start working with the Standard Template Library (STL) right now. The iterators are weird, and you have to invert your brain away from the “typical” object-oriented model to use them. They are “mathematically elegant”, but they are not very object oriented, IMHO. Yes, go ahead and use
std::vector<>(because you shouldn’t write your ownvector), but that should be a “data member” within a “real” class that actually does something. For example,class MyGamecan have one-or-more data members that might be things likestd::vector<Player*>andstd::vector<GameBoardSquare*>. (The goal is to wrapstd::vector<>with “real” classes that you write, where your “real” classes represent your logical problem domain.)