hi,
I am new to programming ! I am just writing match game ! I am trying to move the letter to concerning place .. so I created two dimen-array for it .. but I have problem with moving those to concerning place .. here is my some code of that ... plese help me out to work.. thanks in advance..
code:
#include
using namespace std;
void display(void);//Show the table that have card name in side
void moveCard();
//void playagian();
//===========================================================================================================
char way;
const int ORDER=3;//row number
const int COLUM=4;//colum number
char cardname[][ORDER][COLUM]={"D2","S4","H6","C5","D2","S4","AD","C5","H6","__","AD",}; // char name of card
//===========================================================================================================
int main()
{
cout << endl;
cout << endl;
cout <<" ----->>>>> Match Game <<<<<----- ";
cout << endl;
cout << endl;
cout <<"________________________________________________" << endl;
for(int head =0; head<4; head++)
cout << " | " << head << " |";
cout << endl;
cout <<"________________________________________________" << endl;
display();
cout <<"________________________________________________";
cout << endl;
cout << endl;
cout << " what you want to move?? ";
cout << endl;
cout << endl;
cin >> cardname[ORDER][COLUM];
cout << endl;
cout << endl;
cout << "What you want to go right,left, up,down" << endl ;
cin >> way;
cout << endl;
cout << endl;
moveCard();
cout << endl;
cout << endl;
//playagain();
cout << endl;
return 0;
}
//===========================================================================================================
void display(void)
{
for (int i=0;i