Quote Originally Posted by hamster_nz View Post
This sounds like the sort of problems for which actual databases exist

But I still can't see how your problem hasn't already been answered - maybe I need to be more explicit.

Here is an example that allocates either 100 or 1000000 or 20000 for data to be held in field[2]:
But that is exactly what I wanted to know!
If it was possible for me to have malloc with different sizes, as you showed in char *data.


I will now try to make a test of it here!