Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Pointer vs address ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Ax3l
Cheater
Reputation: 1

Joined: 22 May 2011
Posts: 37

PostPosted: Sun Feb 12, 2012 7:12 am    Post subject: Pointer vs address ? Reply with quote

I really don't get the difference between a pointer and an address, is an address always the same or does it change every time your program loads ?
Sorry for being a noob lol

_________________
Back to top
View user's profile Send private message MSN Messenger
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sun Feb 12, 2012 8:43 am    Post subject: Reply with quote

Some values are just values. For instance, if I want to store "12384" in memory, I do not need to take an address to point to 12384 because I can just store 12384. These are primitive types. You will know their final size at compile time. These will always be the same because of how programs are structured. They are stored on the program stack.

Some can not be stored like that (don't know size at compile time) or just arent. These are objects assigned by the new operator and have their addresses put onto the heap at runtime. You do not know where they are going to be in the heap but you do know that you will have an address that's going to point to them.

tldr; dynamically allocated heap variable versus stack variable.

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites