Tokenizing won't work because it simply appends the two text portions together. Why don't you allocate the number of variables dynamicly, and use them like an array? Or why not use a linked list, or a vector? If you don't know what an array is, here's how it works:
Say we need five integers. We could do this:
Code:
int v1, v2, v3, v4, v5;
v1 = 0;
v2 = 3;
v3 = 6;
v4 = 9;
v5 = 12;
Or whaver you like for your initializations. Or we could use an array:
Code:
int vars[5]; // make 5 integers, grouped under the name 'vars'.
vars[0] = 0; // you index them starting with zero...
vars[1] = 3;
vars[2] = 6;
vars[3] = 9;
vars[4] = 12; // indexing through "size -1", in this case 4. (5 - 1 == 4)
Quzah.