Without giving an explicit size, it works up to index 79. It prints the value 200 at index 79, but when I increase the index by 1 that is 80, it prints nothing and program terminates.
#include <iostream>
using namespace std;
typedef int list[];
int main() {
list myList{};
myList[79]={200};
cout<<myList[79]; // OUTPUT: 200
return 0;
}
#include <iostream>
using namespace std;
typedef int list[];
int main() {
list myList{};
myList[80]={200};
cout<<myList[80]; // No Output and Process finished with exit code -1073741819 (0xC0000005)
return 0;
}
Aucun commentaire:
Enregistrer un commentaire