I am learning C++ and I am currently learning Arrays.
However, I am stuck
I type the following code:
Shouldn't this just display the integer 2?Code:#include <iostream> using namespace std; int main() { int examplearray[100]; cout << examplearray[2] << "\n"; system("pause"); return 0; }
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...