Question: 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

Hello I'm working a c++ simple program that is supposed to take

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!