[openbeos] Re: Largely Offtopic C/C++ question about pointers
- From: Korli <korli@xxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Thu, 28 Jul 2005 00:22:35 +0200
Hi Bruno,
2)
my understanding is you're passing by value a pointer when you use "void
function(t_Array Array) " : the compiler doesn't care the array size
anymore (int (*)[10] => int **), and doesn't want to build.
3)
ptrArray[0] = &Array; //first element should be pointer to a t_Array
in real, first element should be pointer to a pointer to a t_Array
So you should use : element = (t_Array *)((void**)ptrArray[0])[0];
Hope this helps,
Jérôme
Other related posts: