Guest_imported
New member
- Jan 1, 1970
- 0
I understand the definition of dynamic memory allocation.It means that memory for a value to be stored in is allocated while program is allready running.
But isn't array in this example also dynamiclly alocated,I mean memmory for an array is allocated when you read X and that is when program is allready running?
int x=0;
cin>>x;
int y[x]={1}; //Isn't this dynamicly
allocated?Program is
allready running?
But isn't array in this example also dynamiclly alocated,I mean memmory for an array is allocated when you read X and that is when program is allready running?
int x=0;
cin>>x;
int y[x]={1}; //Isn't this dynamicly
allocated?Program is
allready running?