new to programming. best way to learn this stuff?

i purchased c++ for dummies a couple days ago and am wondering what is the best way to learn this. basically, i have read up to chapter 4 and am finding out that reading the code and understanding what it does is easy for me but writing it (copy it from the book), even though i just read it, is dificult because i forget the exact syntax. so i am forcing myself instead of reading new chapters in linear fasion, to go back from the begining and re-read the previous chapters over and over again to memorize the syntax much better before continuing to new chapters.

the problem that i see with this is that it is taking alot of time. i mean, i could have been half way through this 800 page book. but then again, being half way through it may not do anything for me since i would have not memorized 99% of the syntax in it.

for example; i understand what this line of code will do, it's a FOR loop.

int i;
for (i = 0; i <=100; i++)
{
cout << i << endl;
}

return 0;

if i did not re-read the prior chapters over and over again i would have not remembered these lines of code for this FOR loop. my question is; should i continue re-reading chapters to gain memorization of the syntax or is it better to continue reading in linear fasion?

another thing is that i promised myself to not waste time on forums and internet regarding learning this stuff as it too easy to get carried away on browsing and not learning.

i have a passion to learn this. it has always been a dream of mine to develop talent and create games and programs that are bug-free.
well, learnig by doing is the way to go. It's by far easier to memorize something you've done than something you've read.

For the beginning you should pose yourself some minor challenges and if you're stuck somewhere ask someone. But you cannot circumvent the typing
Topic archived. No new replies allowed.