need a function

In this portion of my code the user is entering in 76 numbers. However about 75% of them will be 0. My manager said it would be nice if he could just hit enter and have the number automatically set to 0 rather than having to hit '0' 'Enter'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if (whattodo == 1)
{
    cout << "Enter the quantities for each magazine price. \nAfter you enter all the quantities you will have the chance to edit them." << endl;
    cout << endl << "***Column 1 Column 1 Column 1***" << endl << endl;
    for (i=0; i<76; i++)
    {
          if (i == 26)
          {
             cout << endl << "***Column 2 Column 2 Column 2***" << endl << endl;
             
          }
          if (i == 51)
          {
               cout << endl << "***Column 3 Column 3 Column 3***" << endl << endl;
          }
          cout << "Enter quantity number " << (i+1) << endl;
          cout << fixed << setprecision(2) << "RETAIL $" << retail [i] << "  Quantity:  ";
          cin >> q[i];
          cout << endl;
    }
}

As you can see I've been using cin which doesn't accept whitespace. Is there a function I can use instead of cin? If not, what would be a good way to implement this?
See http://www.cplusplus.com/forum/articles/6046/
You can tweak the code to detect when the inputted string is empty.
Topic archived. No new replies allowed.