constint months = 12;
char * Month[months] =
{"January", "February", "March", "April", "May", "June", "July", "October", "November", "December"};
int *Books[months];
int temp;
for (int i = 0; i < months; i++)
{
cout << "Enter the number of books sold in " << Month[i] << ": ";
cin >> temp;
Books[i] = temp;
}
Right now im trying to make my loop cycle through the month each time, and input a value into a pointer-to-int-array each time, then changing the month afterwards.
Trouble is, right now I'm not sure about the input part, and using cin to input values. How do I go about doing this, and also its crashing, and I cant determine why.