double pointer / indetermined-sized matrix

Hi, all.

I'd like to know how to define a list of an indetermined number of elements, each one of these is also a list of indetermined size. Imagine a matrix, but it must have an indetermined number of rows, and each one of the rows can have a different number of columns (it's not just a matrix).

I thought to do with pointers (a pointer to pointer), but I can't manage to define and initialize in the correct way. When I declare, for example:

int **set;

I get an exception in run-time when I try to make an assignation.

Could you please help me?

Thank you very much,
Francisco
Hi, again.

Well, sorry for posting... it seems that I found a solution, that is here:

http://www.cplusplus.com/forum/general/9508/

I'll try it for my application, and ask again in case it's not enough.

Thanks,
Francisco
Last edited on
Topic archived. No new replies allowed.