Question
Create a separate function to return: Type in several names(6) in the beginning. Store string into a vector. Names must be space delimited. When entering
Create a separate function to return: Type in several names(6) in the beginning. Store string into a vector. Names must be space delimited. When entering a return key without typing anything (i.e., empty line), this process of input cycle ends by using getline(). Split the input string, by counting the white spaces. (Can't use #include sstream) Shuffle the names by each of the characters. Player has to guess the shuffled name.
Example:
Input:
> firstname secondname
> thirdname
> fourthname
> fifthname sixthname seventhname
Total: 6 string
0:firstname
1:secondname
2:thirdname
3:fourthname
4:fifthname
5:sixthname
6:seventhname
Shuffle and print in the main function. Thank you.
Language: c++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started