Hey folks,
First poster here :icon_cheesygrin:
So we got an assignment and part of it is, to write a stack with an array.
So far so good, but I'd like to use a dynamic array that doesn't need the user to input any size.
void init() {
int i;
cin << i;
int *p_array = new int[i];
}
What would be the proper way of creating a dynamic array that changes its size accordingly to the users needs, without any userinput on that?