Sign in to follow this  
Followers 0
destluck

Keep getting stuck

8 posts in this topic

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

 

1

Share this post


Link to post
Share on other sites

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

1

Share this post


Link to post
Share on other sites

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.

1

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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!

1

Share this post


Link to post
Share on other sites

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'

Edited by fir
0

Share this post


Link to post
Share on other sites

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

 

great stuff

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0