I'm trying to load a small 1D array using a for loop and for some reason I'm not getting the correct output.
int main()
{
const int ROW = 3;
int Table[ROW];
for (int i = 0; i < ROW; i++)
{
Table[i];
}
for (int i = 0; i < ROW; i ++)
{
std::cout << Table[i] << std::endl;
}
return 0;
}
The return I'm getting on my console is
0
0
1716919432
I would think that the output would be 0 1 2 (with the newline of course). Not sure what I'm doing wrong.
Table[i];- That line doesn't do anything at all.