C++ Array [Solved]
Hello I have this code
But I prefer to use chars for example
But that gives me an error.. any help to use char on a int array?
Code:
srand ( time(NULL) );
int bad1 = rand() % 9 + 1;
int bad2 = rand() % 9 + 1;
int bad3 = rand() % 9 + 1;
int position = rand() % 9 + 1;
int table1[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
int table2[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
int table3[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
int table4[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
table1[position] = position;
table2[bad1] = bad1;
table3[bad2] = bad2;
table4[bad3] = bad3;
Code:
table1[position] = "D";

