I always wonder if it’s correct to say that something like THIS is a “pointer”, rather than a “variable”:
NSString *fooStr = ...;
Would you call “fooStr” a “pointer” rather than a “variable”? Or is it okay to say both here?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short answer:
A pointer is a variable that contains the location of data memory, whereas a variable contains the data itself.
So you CAN call a pointer a variable, but calling it a pointer is more specific.