PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code. Along with the proper indenting and some well placed blank lines it makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ Hint: You can edit your post, highlight your code and press the <> formatting button. You can use the preview button at the bottom to see how it looks. I found the second link to be the most help. |
date
is an int.cin >> date
attempts to retrieve a number from the input.cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
would do it pretty solidly. Needs #include <limits>
cout<<main();
|
|
|
|
Xerronim wrote: | ||||
---|---|---|---|---|
How will this
loop back to this?
|
|
|
total1 = q1 * CHAIR_PRICE;
. This way there is only one place to change the price and you do not have to go looking through the program to find every place that needs changed.std::cin >> name
will extract from the input buffer the first white space or "\n" whichever comes first. If there is a space anything left will stay in the input buffer until the next call for input and then it will not wait for input, but use whatever is in the input buffer. "std::getline()", or unformatted input will extract everything until it finds the "\n", i.e.,( Enter).