Hello all,
is there a way to pre-allocate memory for a string?
so if I want to do something like this:
And I wanted to pre-allocate some memory this I could do:Code:char *data; string value; for (i=0; i<size; i++) { value += data[i]; }
I'm not looking for an array, but just a string. Set to the right size before I start loading it for speed.Code:string value[size];
Thanks,
Michael