Jump to content
  • Advertisement
Sign in to follow this  
destluck

Keep getting stuck

This topic is 1499 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

 

Share this post


Link to post
Share on other sites
Advertisement

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

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.

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.

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!

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!