Here's my dilemma: I'm writing a program that compares and displays the highest and lowest elements in a user-defined array. Thing is, this array can be as large or as small as the user wants. My problem is getting the size of the array to vary.
This is what I have coded:
int main()
{
int temp = 0;
cout << "How many numbers are in the data set?\n";
cin >> temp;
const int SIZE = temp;
double largesmall[SIZE];
....
and this is the error I get:
File1.C(57); E2313 Constant Expression Required
How do I fix this?