[Solved] Why this C++ program complies and runs in CodeBlocks [duplicate]
Variable-length arrays are not a C++ feature, so this line will cause a compilation error in a compiler that is ordered to strictly adhere to the C++ specification, regardless of the value of n (unless n is const and can be determined at compile-time): int array[n]; Likely you are using a compiler that supports variable-length … Read more