What is the difference between char *val and char ***val. I know what pointers are but can not find anywhere what this triple star notation means.
Asked
Active
Viewed 1,003 times
2 Answers
2
Each star you add is another pointer, which means that char *** val
is a pointer to another pointer that points to a char
pointer

CIsForCookies
- 12,097
- 11
- 59
- 124
1
The three stars/asterisks mean nothing special. Each of the stars indicate a level of indirection.
Let me exemplify:
char *val
is a char
pointer called val.
char **val
is a pointer to a char
pointer called val.
char ***val
is a pointer to a pointer to a char
pointer called val.
So an asterisk for each pointer level.

Morten Jensen
- 5,818
- 3
- 43
- 55
-
thank you. i would up vote but do not have the stupid reputation points yet. – bluerubez May 19 '14 at 17:48
-
1@bluerubez If the _reputation points are stupid_, why do you want to _upvote_? – HelloWorld123456789 May 19 '14 at 17:52
-
because i wish everything had a like button... that was free to use of course – bluerubez May 20 '14 at 00:58