So here is my program:
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
string lotName, bidder1_ID, bidder2_ID;
double reservePrice, bidder1_bid, bidder2_bid;
cout << "Enter lot name: ";
getline (cin, lotName);
cout << "Enter a reserve price:
cin >> reservePrice;
cout << "Bidder #1, enter your ID: ";
getline (cin, lotName);
cout << "Please enter your bid: $";
cin >> bidder1_bid;
cout << "Bidder #2, enter your ID: ";
cin >> bidder2_ID;
cout << "Please enter your bid: $";
cin >> bidder1_bid;
return 0;
}
When running this progr,am, everything goes smoothly until we submit reservePrice. When this occurs the program jumps to:
"Bidder #1, enter your ID: Please enter your bid: $"
Without letting me enter the ID. What is the problem?