I'm fairly new to programming and I am having trouble initializing an array with a const int. so far for the code I have is this:
int temp = 0;
temp += valuesVec.size();
int SIZE = temp; 
int valuesArray[SIZE];
I am trying to make an array with the same number of elements as a vector that read a file and store all the values. the errors it gives me are:
Error   1   Expected constant expression.
Error   2   error C2466: cannot allocate an array of constant size 0    
Error   3   error C2133: 'valuesArray' : unknown size   
Error   4   IntelliSense: expression must have a constant value
all the errors lead back to:    int valuesArray[SIZE];
printing SIZE gave me the value 1118.
I know I am probably doing something stupid and probably forgot some fundamental rule but... Until someone points it out I will be pouring over my book.