I am running Xcode 7.1 on Mac OS X 10.11. I am trying to declare a VLA array in C, but I cannot do this.
second, I use a variable in an array declaration, this is a moot point. An array is not created. I dug in the compiler settings, tried to install GCC manually, I can not figure it out. Can anyone spot the problem? From what I understand, VLA has become standard with C99, and from what I can say, my Xcode works on C11. What is the deal here? Code images and settings are included.
void printTriangle (int height, char rowPatterns[][height]) {
int rowSize = 2 * height - 1;
char rowString[rowSize];
int characterCount = rowSize;
int asteriskCount = 1;
int spaces = (characterCount - asteriskCount) / 2;
int rowCount;
}
source
share