Is it possible to have a variable n, and spawn a new object as onbjectn? For example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
struct block {
int x, y, z, size, rotation, velocity;
};
int nofblocks = 0;
//...
//...
int main () {
new block namegoeshere;
nofblocks = nofblocks++;
new block othernamehere;
nofblocks = nofblocks++;
//...
//...
return 0;}
Of course, namegoeshere and othernamehere would be replaced with the required syntax. It would create objects block0 and block1, theoretically repeatable infintely (block2, 3, etc.). Is it possible?