Why don't you use a dynamic table with pointers?