Hi folks, I hope as many people can post here. I've been learning C++ for about 3 months with Primer 5th (upto chapter 10) and I just have to ask, how the heck you guys remember stuff? I don't really have a problem learning, I usually understand what I read, but when I go to code so many little details I forget. I have to constantly look things up to see if that thing was for this container or that, and so on. I keep .txt notes of crucial things to remember. Especially the syntax of the things and member functions of containers and what operations you can and can't do, especially iterators.
I always feel so crap because of the exercises littered throughout the book. I understand particular stuff, but when I get to these I'm like O.o ??? I have to constantly reread through chapters to refresh my memory especially because you don't use certain features a lot.
I also wonder what stuff you do to practice? I can't really think of programs to do apart from such trivial stuff forcing the use of particular concepts. I've done a calculator of all things maths, which I keep expanding, hangman and an employee statistics DB (all console). I'm tried playing with SFML but things get too complicated and I haven't got into object-orientated stuff much.
Do you guys have methods or advice, was anyone else like me and is good now? Hopefully you can tell me it's going to be hunky dory, because I'm getting stressed. Any kind of encouragement would be grateful because I'm feeling pretty useless with my code now.
Typically, I learn by teaching. This sounds somewhat paradoxical, but it's very effective for me. Let's say you read something which you feel you understand. Now, put the book aside (and don't look at it), take out a piece of paper, and write down everything you think you know about this particular concept. Even if you're not sure, or you know you're wrong, write it down anyways. The idea is that you're pretending to write a PHD or some exceptionally knowledgeable document.
Once you've got nothing left to write, take a look back at the book, and see where you went wrong. For me this reinforces the things which I thought I knew that turned out to be correct. I do this for any of the topics I independently research.
As for exercise, I like to program in a niche that interests me greatly, namely audio and image processing. I try to think about ways to sort of reinvent algorithms or concepts based on fundamentals I'm familiar with, which, when I succeed, is a guarantee that I'll never forget what I just learned.
It comes as second nature. Also there is NOTHING wrong with looking at references. A lot of people read and reread them often. The more you experiment with things and try multiple methods to solve problems the better you learn also.
The more you practice using a concept or tool, the better you'll remember it. The same goes for pretty much every field.
I also wonder what stuff you do to practice?
Considering you have exercises in your book, just start with those. Even if you don't understand them completely, just try. Then, if you get stuck, ask for advice/help.
Also there is NOTHING wrong with looking at references.
+1 to this.
Whenever you have to use a new concept, you probably will have to refer back to some documentation or reference a lot, but as you continue practicing, the information will stay ingrained in your mind. You will find yourself having to reference things less and less the more you *gasp* practice.
Do you guys think it a bad idea to try learning a library or game engine too while I'm still learning C++? I want to get into some nitty gritty to keep me busy. Ultimately I aim to be a 2D game dev.
Would it be a bad idea trying to learn an engine or library this soon? I'm familiar with functions, classes, containers and the basics. Though I haven't got into OO stuff much yet. I don't know things like inheritance (know the concept), polymorphism, virtual, templates etc.
writing stuff down helps me learn. Say I am learning about a new subject. After reading about it, then I start testing out what I read, I write a research paper on the subject, more code testing after that, Then I try to present it in an oral fashion like I am giving a lecture on the subject from beginning to end to see how much I really know.