#include <iostream>
using namespace std;
int main(){
int n;
cout<<"Enter the size :";
cin>>n;
int array[n]; // I've worked some outputs and it works
return 0;
}
Run Code Online (Sandbox Code Playgroud)
这是某种动态分配吗?
为什么它甚至没有给'n'作为"const"的错误?
此外,写入cout << array[n+5];不会导致编译时或运行时错误.
我正在使用Dev-C++.