thunderclees
Programmer
I'm trying to take in user input to get a number for each member of an array. I'm trying to loop the question and take input each time the loop runs, but I'm losing myself... heres what i have...
const int numAliens = 7;
int casName[numAliens];
const char *species[numAliens] =
{"alien1","alien2","alien3","alien4","alien5","alien6",
"alien7"};
for(int i = 0; i < numAliens; i++)
cout << "Please enter the casualty amount for <<
species << ".";
cin >> species;
Thats as far as i got, it wont compile, i dont know if im going about it in the wrong way or what. Thanks for the help.
const int numAliens = 7;
int casName[numAliens];
const char *species[numAliens] =
{"alien1","alien2","alien3","alien4","alien5","alien6",
"alien7"};
for(int i = 0; i < numAliens; i++)
cout << "Please enter the casualty amount for <<
species << ".";
cin >> species;
Thats as far as i got, it wont compile, i dont know if im going about it in the wrong way or what. Thanks for the help.