the compiler complains about an integral constant for the array declaration.
can it be done like this or do i have to use a pointer to set up the array ?
i know this code is absolutely useless but i'd like to know for theoretical purposes.
-----------------------------------------------------------------------------------
void create(const int);
main()
{
int size;
cin << "Enter a number: " << size;
create(size);
return 0;
}
void create(const int max)
{
int array1[max];
}
-----------------------------------------------------------------------------------