In your response I want 2 answers from you:
Could you explain me, in a neat/technical sentence, how a pointer works?
Could you explain me what the difference is between a local, global, member variable? Also in in neat sentence.
I'm not him but I couldn't resist this little challenge. Always fun to see if I've listened closely enough during my school lessons.
Actually created a user here on the awesome GD.net to post this
Pointer: A pointer work in the way that it gives you direct access to the memorybank/memoryspace in which a variable is stored on your computer. Meaning the chunk of memory that is reserved for this variable. Meaning if you forget to *pointer=0 before reassigned it another value you will create memory leaks as the memorybank is still "locked".
Local - Local variables are variables accessible by all functions within the class where it is created.
//Destroyed when the block/function/class ends
Member - Member variables are only accessible within the scope where they are created meaning inside a function for instance
//Destroyed when the block/function ends
Global - Global variables are accessible from everywhere in your program, hence the name global.
//Destroyed when the program terminates
Wow that was more than a sentence, sorry.
Of course I would appriciate it a lot if you would confirm if I have indeed been listening or need to redo my last semester ;)
You are of course welcome to PM me the answer as to not spoil it completely.
And sorry for hijacking/butting in on the post