how to dynamically create an array to a function c++ code example
Example: declare dynamic array c++
int main()
{
int size;
std::cin >> size;
int *array = new int[size];
delete [] array;
return 0;
}
int main()
{
int size;
std::cin >> size;
int *array = new int[size];
delete [] array;
return 0;
}