FurryGorilla
Technical User
Hi
I'm having a little trouble finding any information on exactly how to do this. I merely need to resize a one dimensional array depending on another number.
I have 2 arrays of floating point numbers named 'buffer1' and 'buffer2' and these are to be resized using the integer 'size':
buffer1[size];
buffer2[size];
I've had a look at information on malloc and realloc but can't work out how to do it. I imagine I'm going wrong with pointers but any help would be greatly appreciated.
Thanks
Chris
I'm having a little trouble finding any information on exactly how to do this. I merely need to resize a one dimensional array depending on another number.
I have 2 arrays of floating point numbers named 'buffer1' and 'buffer2' and these are to be resized using the integer 'size':
buffer1[size];
buffer2[size];
I've had a look at information on malloc and realloc but can't work out how to do it. I imagine I'm going wrong with pointers but any help would be greatly appreciated.
Thanks
Chris