I am trying to create an array (without dynamic allocation and vectors)
int main(){
int n;
scanf("%d",&n)
int a[n]; // This works and compiles.
int a[n] = {} // This does not work
}
Why is that compilation works with declaration but fails with initialization, why?
Aucun commentaire:
Enregistrer un commentaire