|
-
Jan 13th, 2003, 11:28 AM
#1
Thread Starter
Member
Pointer ** <- What is this?
I was just looking across some code and came across this:
const char *p1;
char **p2;
What the heck is p2? p1 is a pointer to a constant. Is p2 some type of pointer?
Thx,
Tim
-
Jan 13th, 2003, 12:06 PM
#2
p1 is a pointer to a character that you may not modify. This character might be the first in a string of characters.
p2 is a pointer to a pointer to a character that you may modify.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 13th, 2003, 12:08 PM
#3
Thread Starter
Member
A pointer to a pointer. Lovely!
-
Jan 13th, 2003, 12:13 PM
#4
It's usually only used for function parameters. Let me think, there's some CRT function that uses it...
strtol I think. Expects the address of a const char* to be passed which is then set to point to the first character that couldn't be parsed anymore.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|