-2

when I declare array like this: char temp[size]; in the function void rotateLeft(char arr[], int size), I got the error: ISO C++ forbids variable length array 'temp'. I am very confused as isn't that how we declare array in C++? If we can't declare a variable size length array, how am I suppose to declare an array that have parameter "size" as it's length?

Jack
  • 1
  • 2

0 Answers0