If you are given a C++ book, what would you do?

I'm trying different techniques to learn C++ from a book. Anyways, what did you do when you learn C++ from a book? Do you read then,summuriaze them? Anything that helps you improve or interact with the book? I know about "practice programming". I already got that down.
Last edited on
Read and understand any topic(concept) and than try to make some good example of that concept.. that have been great useful to me so , i think it might be useful to you.
Alright!
If you're referring to a beginner's book, try reading it through, front to back is typically the best way, and type in each code example. Play with the examples and see how new functions/operators work. Add comments to help yourself later on, and never delete any program. They are invaluable reference material.

If it's going to be more of an advanced book, they're all worded with a more technical language. It's important that you try to pick up on certain terms so that when they're referred to later in the book, you understand. Sometimes writing them down in a notebook or in an application, that is relevant to the material, will help to offer better understanding of it.

There are things you won't get right away, and some things, no matter how many times you read it, you might not understand. I still struggle with even some simple concepts because I never formally learned them and research material loses me so much more since it uses a writing style that I'm not familiar with.

Just remember, practice will make things stick better and will show you different ways to use your new found knowledge.
@Pulse I think I got a meduim book
What's the name of it?
C++ how to program third edition by Deitel.

Edit: oh also, what should program should I make with the control structure? Here's the one I'm learning atm: if, if/else, and while.
Last edited on
Wow, that's an old book. But I believe that's still a beginner's book. I read through some of the more current editions, number 8 now, and it seems more geared towards teaching the basics of the language. There are a few issues with it compared to the current standard, but the fundamentals are still there.

As for the control structure, it's hard to say about how to work with them, but typically when I suggest new programmers to make applications, I start with something simple, a basic concept that you can improve as you get further into the syntax. I'd suggest possibly having the user enter a number, and if it's positive, display the number and inform the user it's positive. Do the same for negative and 0s.

As for a while loop, you can implement a grading system as if you were a teacher, which is a very common program that can use all of the syntax very well. You can ask the user, who would be the teacher, to enter several grades and then once they enter a negative number, I've never seen a negative grade, it stops the loop. Average all of the numbers together in the loop, add them together, and also find the highest and lowest grade. You could also use your if/else if/else statements to print an 'A' for anything 90% or higher, 'B' 80%+, etc.

Each new lesson you learn, improve your grading program until you have completed the book. Since it's older, somethings may not work right anymore, but C++ is pretty good at being backwards compatible. I hope this will give you an incentive to keep learning all of the features of C++.
Wait? C++ been changing lately? Isn't all the C++ How to program edition is the same thing but I'm a high school student so that doesn't matter?. When I get to college, I can buy their new edition.
closed account (o3hC5Di1)
DetectiveRawr wrote:
Wait? C++ been changing lately?


Not so much changing as it has been evolving.
There have been new featured added to the language and new standards usually also revise older ones for obsolete stuff or incompatibilities. Nothing to worry about too much.

As for learning, I always like to explain how your brain learns new things as it is a great help in learning any new skill.

Your brain will store new information in a "temporary memory" (short term memory).
When the information is repeated, more and more parts of it are transferred into the long term memory.
The more connections you have with the new information from previous information (i.e. you already know another programming language) the easier this process goes.

Contrary to popular belief it's actually not best to repeat things over and over for a short period of time, because then the brain will start to forget after a while.
To make sure your brain retains stuff you need to repeat it a number of times in the beginning and then systematically repeat less and also repeat less of the information, stripping it down to it's essence as you go.

Taking breaks and good sleep are very important in learning as they allow for your brain to get itself organized. That being said, everyone has a different way of retaining information (e.g. visual, auditive, etc.) so the "best way" to learn is the way that works best for you.

Hope that helps.

All the best,
NwN
I find that I take up most of the book if I actually put it in practice. Without that, it's about as good as useless to me.

The thing is that in the book, when I first read it through, I will understand what is being said, and probably memorize the general idea behind it. But almost all of the time I forget things like syntax, etc. Also, a book might teach you a language, but it will hardly teach you to debug, which is (in my case) the greater slice of the cake.

Therefor it is absolutely crucial that you DO the examples in the book, or create examples for yourself. Don't be happy with "I get it", prove to yourself that you get it.
Alright, now this might work!
Topic archived. No new replies allowed.