How come when I run this code:
After the program closes, it gives this message:Code:#include <iostream>
using namespace std;
int main()
{
int examplearray[95];
examplearray[95] = 50;
cout << examplearray[95] << "\n";
system("pause");
return 0;
}
Run-Time Check Failure #2 - Stack around the variable 'examplearray' was corrupted.
Is it because I have to give a value to every element of the array?