Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I wrote following: part of the code , for Parsing. strings , Please dont write code in arrays and all the fancy staff, could you
I wrote following: part of the code , for Parsing. strings , Please dont write code in arrays and all the fancy staff, could you just fix what I have done wrong?while( uTxt == "q"){cout break;} if (uTxt.find(',') == string::npos). {cout
for (int i= 0 ; i f (uTxt.at(i) != ' '){ nTxt += uTxt.at(i);}
while( nTxt.find(',') != string::npos) { fNm = nTxt.substr(0, coma); lNm = nTxt.substr(nTxt.size() -coma); }
while (uTxt != "q"){ cout
a lance Share 1520 ong Warmups Parsing sengotor) 15.20 Ch 9 Warm up: Parsing strings (C++) (1) Prom the user foran that contain s sowed by a comme Emples of sings that can be accepted - Jl, Allen . J Alen Jalen Enter input string: (2) Report an error of the input string does not contain a comma Cortinue to promote a coma then assume that the input also contains two things 2 pts) a valid stringered the outcomes Inter input string: Jill Allen EETE: Noc in string Enter input string: Jill Allen (3) Extract the two words from the input string and remove any spaces Store the strings in two separate variables and out PES) the string 2 Enter input string: Jill, Allen First word: J412 Second word: Allen (4) Using a loop. extend the program to handle multiple lines of input Continue until the user enters to quit (2 ) Enter input string: J411, Allen First word: 3:11 Second word: Allen Enter input string: Golden, Monkey First word: Golden Second word: Monkey Enter inpus string: Washington, DC E vord: Washington Second word: DC Enter input string: ACTIVITY 1520.1: Ch 9 Warm up Persing strings main.cpp Loadout templateStep 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