Hi,
I'm programming a game and one of the variables is a two dimensional
array in wich I store the names of the players. So far so good; with
cin.get I ask the names of the players and everything works fine.
Now I want the player also to be able to play against the computer and
I don't want him to fill in the name "computer" interactively; I want to
set the second element of the two-dimensional array to computer.
When i do
player[2][30];
player[1]="computer";
I get an error that the compiler can not convert from a char[9] type to
a char[30] type wich I can understand.
but when i do
player[1][0]={'c'}; the comiler complains of missing ;
Does anyone know how to solve this problem?
The goal is to get a two dimensional array containing the name of the
first player in the first array. (this is done with cin.get(player[0],max);)
In the second I want to store the name computer.
Reginald