I am trying to make a program to print the names of an array, the array represents the first row of the chess board. My attempt is with the following program but the only thing that I can achieve is printing numbers :( .
#include <iostream>
using namespace std;
void main()
enum pions // giving the names in pions
{
Tower=1 ,
Horse ,
Officer ,
Princes ,
King };
int Chess [0][8]={Tower , Horse , officer , Princes , King , Officer , Horse , Tower };
// putting the names of each coordinate in the array (above ) .
cout << " in this place the pion that is placed is the " << chess [0][1] << endl;
I know that the program will print the number 2 , but how can I make it print the word "Horse" instead of 2 ???
The cout command is written by the creator of the program (me :P) how i can give the option to the user to choose the part of the array that is going to be printed ?
Thanks in advance for your time and effort, a big sorry in case I am not clear, its my first post :D .
Any recommendations are welcome.