Code:
void variables1(){
time_t t;
time(&t);
srand(t);
int mine1 = rand() % 9 + 1;
int mine2 = rand() % 9 + 1;
int mine3 = rand() % 9 + 1;
int mine4 = rand() % 9 + 1;
int mine5 = rand() % 9 + 1;
int mine6 = rand() % 9 + 1;
int mine1x = rand() % 9 + 1;
int mine2x = rand() % 9 + 1;
int mine3x = rand() % 9 + 1;
int mine4x = rand() % 9 + 1;
int mine5x = rand() % 9 + 1;
int mine6x = rand() % 9 + 1;
int minemap1[ 10 ] = { 1,2,3,4,5,6,7,8,9,10 };
int* minema1 = &minemap1[10];
int minemap2[ 10 ] = { 'A','B','C','D','E','F','G','H','I','J' };
int minemap3[ 10 ] = { 'A','B','C','D','E','F','G','H','I','J' };
int minemap4[ 10 ] = { 'A','B','C','D','E','F','G','H','I','J' };
int minemap5[ 10 ] = { 'A','B','C','D','E','F','G','H','I','J' };
int minemap6[ 10 ] = { 'A','B','C','D','E','F','G','H','I','J' };
for ( int x = 0; x < 10; ++x){
cout << minemap1[x];
}
cout << endl;
for ( int y = 0; y < 10; ++y){
cout << minemap2[y];
}
cout << endl;
system("PAUSE");
}
int main(){
cout << "-------------------------" << endl;
cout << "| Welcome To MineSorter |" << endl;
cout << "-------------------------" << endl;
variables1 ();
}
It should cout minemap1 with 12345678910 no?with I jsut get strange letters...