examples
anyone have an example of user inputing the size of array for struct?
Tutorial -> Dynamic memory
Last edited on
Dynamic allocation? If yes, is more or less this:
1 2 3 4 5
|
int* _myVar = 0; //first value
_myVar = new int[10]; //first size: 10
delete[] _myVar;
_myVar = new int[15]; // new allocation. The size is 15 now.
|
Topic archived. No new replies allowed.