Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I'm working a c++ simple program that is supposed to take an arbitrary amount of command line input (assumes these are names, but any

Hello I'm working a c++ simple program that is supposed to take an arbitrary amount of command line input (assumes these are names, but any input is acceptable), until exited with ctrl+d. After accepting any number of names, the program should return the each of the user inputs by greeting them with "Hello, (user input)!". I've generated code that immediately responds to the input

image text in transcribed

but the greetings should not appear until the end. For example, I could type, John, and then Sue, and then Mary into the command line, and then after prompting an exit, it will return Hi John!, Hi, Sue!, and Hi, Mary!, each on separate lines. If you could give me some pointers on how to do this, I would be most appreciative. Thanks!

ce Build Debugger Plugins Perspective Settings PHP Help HelloClass.cpp X #include iostream> include int main ) std::string name; 9 while (std: :getline (std::cin, name)) 10 std::cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

Students also viewed these Databases questions