subject

Write code (C++) that inserts userItems into the output string stream itemsOSS until the user enters "Exit". Each item should be followed by a space. Sample output if user input is "red purple yellow Exit":red purple yellow #include #include #include using namespace std;int main() { string userItem; ostringstream itemsOSS; cout << "Enter items (type Exit to quit):" << endl; cin >> userItem; while (userItem != "Exit") { /* Your solution goes here */ cin >> userItem; } cout << itemsOSS. str() << endl; return 0;}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
You know the right answer?
Write code (C++) that inserts userItems into the output string stream itemsOSS until the user enters...
Questions
question
History, 13.05.2021 22:00
question
Mathematics, 13.05.2021 22:00
question
Computers and Technology, 13.05.2021 22:00
question
Mathematics, 13.05.2021 22:00
Questions on the website: 13722360