In
C++
round braces are mandatory in function calls.
Change from
Quote:
if (test=="yes"){
printmap;
}
to
if (test=="yes"){
printmap();
}
You should also change from
Quote:
string map[6][6];
to
string map[7][7];
in order to avoid buffer overrun.
Finally this line, probably is not what you actually wanted to write, it
cout<< map[0][0], map[1][0], map[2][0], map[3][0], map[4][0], map[5][0], map[6][0];
only outputs the last item (
map[6][0]
) (see
comma operator at Wikipedia[
^]).
You possibly intended:
cout<< map[0][0] << " " << map[1][0] << " " < < map[2][0] << " " << map[3][0] << " " << map[4][0] << " " << map[5][0] << " " << map[6][0];