Hi I am new to C++ and I just need some advice on declaring dynamic arrays.
Take for example this code block:
int a=0;
cout << "Enter Arr size: ";
cin >> a;
int arr[a];
My compiler gives no error doing this but looking around the web I see many articles saying I should be using the new and delete commands to allocate arrays dynamically. My main question is if this is ok to do? Or will I run into problems in the future.
Thank you in advance for your help.