2d array problem

I've recently made an array for a tictactoe program, but then when I compiled it, it gave me this strange output, like this here:
003AFAC0

and this here:
0019Fe90


here's the code:
I couldn't find the solution to this problem, although I think that it's probably going to be something very stupid that I overlooked :/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;

int main()
{
	int gameBoard[3][3] = 
	{
		{1, 2, 3},
		{4, 5, 6},
		{7, 8, 9},
	};
	
	string anyOtherInput;
	cout << gameBoard << endl;
	cin >> anyOtherInput;

	
	return 0;
}


please help me find the solution to this problem :(
Remember that an array is a pointer to the first element of that array. You're printing the reference of the first array element. To print an array you must use a for loop or something like that.
thank's a bundle!
I new it would be something stupid that I forgot...
now I can finally continue with my project
Topic archived. No new replies allowed.