0

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?

Edited by WaltP: Added CODE tags -- with all the help about them, how could you miss using them????

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by VernonDozier
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.