I was wondering if we can make an array with a size specified by the user.
Ex:
int a; cout<<\"Enter desired size of the array\"; cin>>a;
Use std::vector (requires header ):
std::vector
int size; cout<<"Enter desired size of the array"; cin >> size; std::vector array(size);