+ 8
Any one knows what (data_type**(any_name)) means?I've basic concept of pointers..but this one seems a little odd...?
I can tell that a pointer is used to store memory address of another location in memory and using *(dereference operator) we can access the value stored in the memory address pointer contains...but the above syntax is a little bit odd..maybe there's something silly i'm missing...?
5 ответов
+ 4
double ** mean you have created a double pointer that points to another double pointer that finally points to a double value... so it's like a chain.. you can extend it to double *** which means that you've created a 3rd pointer that points to the 2nd pointer that points to the 1st pointer that points to double value... and so on.
p2 --> p1 --> value
p3 --> p2 --> p1 --> value
we usually use this way when we want to keep our 1st pointer unchanged... so we send the 2nd pointer instead and if it changed this will not affect the 1st pointer..
hope that was clear!
+ 3
pointer to ponter
+ 2
Thanks for that :)
0
I don't know but I would guess it is an attempt to change the data type.