Jump to content

Problems understanding pointers in C++

Ok so i'm pretty new at c++ and i'm still learning, but i was wondering if anyone could point me to a place that can give me a good understanding of c++ pointers, i've read several articles and the section of the book that i'm learning from, but i just can't wrap my head around them. so if someone could help that would be appreciated. 

Link to comment
Share on other sites

Link to post
Share on other sites

How new are you? Pointers don't seem to be something that a beginner would be learning. Pretty much, they're memory addresses for memory management. You can check out Professional C++ Second Edition if you really need some help.

 

Good to know about, not necessarily good to use just yet.

Link to comment
Share on other sites

Link to post
Share on other sites

How new are you? Pointers don't seem to be something that a beginner would be learning. Pretty much, they're memory addresses for memory management. You can check out Professional C++ Second Edition if you really need some help.

 

Good to know about, not necessarily good to use just yet.

 

well im new in the sense that i've only learned about variables functions and arrays and this is the next section the book i'm reading covers, but you are right that i'm not a total beginner but i just don't consider myself an intermediate programmer just yet.

Link to comment
Share on other sites

Link to post
Share on other sites

well im new in the sense that i've only learned about variables functions and arrays and this is the next section the book i'm reading covers, but you are right that i'm not a total beginner but i just don't consider myself an intermediate programmer just yet.

If there's ever a part of the book that you have an issue with, just read it, try to understand it, and attempt to apply it to some form of program. Then, if you still have an issue, skip it and try to come back to it later. That's what I'm doing. I really don't know much more than you do. Just keep at it. Not understanding a part of the language really pushed me away from it. That's just the type of person I am, but I'm thankfully getting back into it.

Link to comment
Share on other sites

Link to post
Share on other sites

If there's ever a part of the book that you have an issue with, just read it, try to understand it, and attempt to apply it to some form of program. Then, if you still have an issue, skip it and try to come back to it later. That's what I'm doing. I really don't know much more than you do. Just keep at it. Not understanding a part of the language really pushed me away from it. That's just the type of person I am, but I'm thankfully getting back into it.

Thanks il keep that in mind.

Link to comment
Share on other sites

Link to post
Share on other sites

Like mkylem said pointers store a memory address of where that variable is kept in memory...

 

The biggest trick to learning them are operators and their precedence...

 

*,&,->

 

and what you should pass to functions...

 

Here is a pretty good overview for basic pointers:

 

 

Link to comment
Share on other sites

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

×