In Toggleplayer, you do
player == 'X';
This is NOT assignment.
Enable more warnings on your compiler!
1 2 3 4 5
$ g++ -Wall -Wextra foo.cpp
foo.cpp: In function ‘void Toggleplayer()’:
foo.cpp:47:14: warning: statement has no effect [-Wunused-value]
player == 'X';
^
At first, you forgot to initialize your 'player' variable at line 4.
Then, at line 47, you wrote a comparison instead of an assignment. There you don't need even an if else. Instead you could use the ternary assignment: player = player=='X' ? 'O' : 'X';
And, at your Input() function, you could abbreviate the bunch of assignments by a single:
1 2
if (a >= 1 && a <= 9)
*matrix[a-1] = player;
This is been able because multidimensional arrays could be accessed as smaller dimensioned arrays.