[Solved] find numbers at string line c++
As mentioned in @Jhonny Mopp’s comment the primary problem is, that you don’t read a whole line here: cin>>line; it just reads up to the next whitespace delimiter. What you actually want is: getline(cin, line); This would read in the whole input until you hit Enter. Regarding the rest of processing refer to that Q&A … Read more