dear oh dear. simple instructions still not good enough....
look
Code:
cout << "How many items would you like to buy? ";
cin >> times; // this leaves a newline in the stream that getline takes as its input
for(int i = 1;i <= times;i++)
{
cout << "Which item would you like to buy? ";
//its completely skipping over this getline
cin.ignore(80,'\n'); // this will remove from the stream 80 chars or up to a newline whichever comes first
cin.getline(item,30); // hey presto not skipped anymore!
cout<< "How many?: ";
cin>>num_of;
cout<<"\n";