Home > Back-end >  For the first time to post ask everyone a great god a c set of problems
For the first time to post ask everyone a great god a c set of problems

Time:09-23

A c + + in the title of the request, in turn, the input string 0 means input end;
Such as: input "Tom, dick and harry fifty 0", in order to read the "zhang", "li si", "detective";
Could you tell me how to write a great god this code;

CodePudding user response:

Use the scanf should be ok

CodePudding user response:

To write in circulation

CodePudding user response:

String s=""
While (s! {
="0")STD: : cin & gt;> s;//automatically according to the division of Spaces or carriage returns
}

CodePudding user response:

Write a SplitString (const STD: : string & amp; S, const STD: : string & amp; C, STD: : vector & V);
Thought is: from the string s hard to find c, found after intercepting string in v;
Don't just look for it on the net, a lot of the code;
  • Related