Hey there ive been given an assignment to make a connect4 game, i havent been using c++ long so i'm still not sure quite how everything works, so far i have been able to print a grid and i am currently stuck on how to start placing counters down on the grid, if anyone could point me in the right direction for doing this it would be much appreciated. the code ive come up with so far is:
CODE
#include <iostream>
using namespace std;
void print_grid(int arr[7][6]);
int main()
{
int arr[7][6] = { {1,2,3,4,5,6},
{7,8,9,10,11,12},
{13,14,15,16,17,18},
{19,20,21,22,23,24},
{25,26,27,28,29,30},
{31,32,33,34,35,36},
{37,38,39,40,41,42}
};
char Player1;
char Player2;
cout << "player one enter your name ";
cin >> Player1;
cout << "player two enter your name ";
cin >> Player2;
print_grid(arr);
cout << "Player one's move";
cin >> arr[7][6];
int a = 0;
cin >> a;
return 0;
}
void print_grid(int arr[7][6])
{
for(int i=0;i<7;i++)
{
for (int j=0; j<4; j++)
{
cout<<"|_";
}
cout<<"|";
cout<<endl;
}
}