When I execute this I get a runtime error that says the variable narray is uninitialized, but as far as I can tell it is initialized! WHAT IS GOING ON!?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include "stdafx.h"
#include <iostream>
usingnamespace std;
int main()
{
constint ARRAY_LEN = 10;
int narray[ARRAY_LEN] = {1,2,3,4,5,6,7,8,9,10};
for (int index = ARRAY_LEN - 1; index >= 0; --index)
cout << narray[ARRAY_LEN] << endl;
return 0;
}