Code:
int* arr = new int[size];
Or, more specifically:
Code:
#include<iostream>
using namespace std;
int main()
{
int s;
cout << "Enter the size";
cin>>s;
int* arr = new int[s];//according to notes here will be error becz of
return 0;
}
You can use that const int size if you want, don't have to, depends on your style/program.