Hi,
I'm trying to create an array with as many elements as the users inserts.
My compiler (MS Visual C++ 6.0) keeps telling me, that "numbers" must be constant...Is there any way to pass that nad make my code work?Code:#include <iostream> using namespace std; int main() { int number = 1; cout << "Number of elements in array?\n"; cin >> number; int elements[number]; cout << "Insert the elements\n"; for ( int a = 0; a <= number; a++ ) { cin >> elements[a]; } return 0; }