how can i write a variable sized array...for instance:
1 2 3
in >> x;
now, that wont compile on my compiler (Borland turbo c++). can anyone help me and tell me how i can create an array that is of a variable size?
my compiler gives the error that it cant convert int into int* (i.e, it cant convert the x into the array[x])
thanks for the help
int *myArray; //Declare pointer to type of array
myArray = newint[x]; //use 'new' to create array of size x
myArray = 10; //Use as normal (static) array
delete  myArrray; //remeber to free memeory when finished.