There is Array of Pointer:int *ptr[]
Pointer To Pointer:int **ptr
then is there a stuff : Pointer of Arrays?
There is Array of Pointer:int *ptr[]
Pointer To Pointer:int **ptr
then is there a stuff : Pointer of Arrays?
i think there is, but i can't think right now. maybe in the morning...
in any case, you're looking for english to C++ translations. english is very different from c++. some stuff which makes perfect sense in c++ is nearly inexplicable in english, and vice versa. (which can explain why so many people learn better from code than from articles)
pointer of arrays...
Doesn't make much sense to me. You can have an array of pointers as you've shown but I'm not sure about a pointer of arrays, it just sounds wrong.
An array of pointers is basically a pointer to a pointer, just different syntax.
"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers
Pointers of Array doesnt makes sense?
You can think of an array as a pointer. So, a pointer to an array is really just a pointer to a pointer. People use subscripting because it is easier to read.Originally posted by Q4u
Pointers of Array doesnt makes sense?
>> then is there a stuff : Pointer of Arrays?
I think what Q4u meant was to say pointer to array.
You can declare a pointer to an array like this:
int (*ptr)[10];
ptr would thus be a pointer to an array of 10 elements.