I meet a case that I want to have an array of pointers(M rows, N cols), each member of this array points to a float vector (L‑length). Could you tell me how to establish it? I hope I can establish it dynamically because I usually don't know M, N, and L at first and L may be different for difference vector.
My occasion is that I need to read Green function with different distance(NDIS) and depth(NDP). So I need to create something like *grn[NDP][NDIS]. then use each pointer of this array to point to a component of green function.
By the way, I think it's a little bit complex than setting a size known array of pointers. Do you think it's worth to use this type of data structure? I'm trying to write a program to deal with observation, which I usually unknown it's size. However, it's ok for me to use a size-fixed array of pointers. If the total data is larger than the given size, I could ignore the over-sized part. But I'd hope to use them all.