New to C++ Stuck on Arrays. Help please!
I am learning C++ and I am currently learning Arrays.
However, I am stuck :(
I type the following code:
Code:
#include <iostream>
using namespace std;
int main()
{
int examplearray[100];
cout << examplearray[2] << "\n";
system("pause");
return 0;
}
Shouldn't this just display the integer 2?
The program compiles, however i get this message:
Run-Time Check Failure #3 - The variable 'examplearray' is being used without being initialized.
I press continue and the program displays:
-858993460
Press any key to continue...