Keep getting stuck

Started by
7 comments, last by destluck 9 years, 9 months ago

Alright i have been trying to learn C++ for a while now. Been buying VTM's and books and i always seem to get stuck. Always around the chapters 6-7 and that turns out to be where pointers kick in. Maybe the books i have a just bad or im just a real slow learner.

Anyhow i was wondering if anyone could link me a few things i can read or tutorials that helped you learn C++.

If anyone is willing to coach me a bit that would be awesome :) .

Any info or help is more then welcomed sick of being stuck or not able to wrap my head around some issues i have.

DestLuck

Advertisement

The only thing I can tell is that you are not alone getting stuck when it comes to pointers.

hehe well that's reassuring i think wacko.png ...

when i finish work in 1h ill be able to pinpoint exactly the parts im having issues with.

Normally i learn by knowing what specific things are used for in a game based environment.

I never had problems with pointers. I prefers them much even I know that C++ has references as well.

So I am a bit the wrong person to tell you how to come to it. Only tell you: Dont deperate.

Check this out: http://alumni.cs.ucr.edu/~pdiloren/C++_Pointers/
I haven't read it all but it looks quite good to me.

Thx ill give it a read.

Conquering pointers was, for me as a beginner programmer back in cs uni, one of the most (and maybe THE most) difficult aspects of C programming. I find the transition from declaring and using simple variables, to manipulating pointers, the next BIG step in a programmer's progress. As Tribad said, don't be desperate and don't give up. It's perfectly natural.

Just keep practicing and studying them over and over again, draw them on paper (yes, those cool little boxes that have numbers in and out of them), write code for simple cases of them, and, one day, this magical moment comes where it is suddenly all crystal clear in your head and you'll be able to move on.

Don't rush on pointers, better stick on them and get a really solid understanding, it will be crucial for the next challenges.

I read somewhere (can't remember where though, so credit where it's due) that we/you "should embrace frustration. It's just the natural response of your brain getting out of his comfort zone while trying to learn something new.", or something similar along those lines :)

Don't give up!

pointer are not so hard remember that for example "int*" is a name of

a type then x is a pointer (on which you can do simple arithmetic, and you can assign a values to it but only other pointers or adresses of the entities, those adresses you take using & like &a

int a = 100;

int* x = &a;

then you could get value over some pointer by *x and you can treat (*x)

just like normal variable

ps impotrant to know that int* x int*x int *x and int * x and int * x means the same but for me it is better to use int* x as x is a pointer of type int*, you can treat *x as a expression of type int , but when deconstructing it and asking what is x you go that x is int* , so this "int* x" is more 'primary'

thx for all the great posts and links reading trough them as we speak :)

great stuff

This topic is closed to new replies.

Advertisement