I want to scan words separated with spaces and written on several lines. I don't know the amount of words in advance. And I want to create std::vector of std::string. How to define the end of an input?
Asked
Active
Viewed 22 times
0
-
Please tag a particular standard of `c++` if and only if you're limited to that standard. Please don't tag multiple standards. – Elliott Apr 17 '22 at 09:33
-
Business task is non-obvious. You can't make program magically undestand when to stop reading input. – Apr 17 '22 at 09:34
-
welcome to stack overflow! You tag a lot of c++ versions - Which c++ standard are you actuallly using? Makes no sense to tag all of them. Also, could you show some code of what you have tried so far, and an example in-/output? You must for sure have come across some examples of how to do something similar like this on the web? – codeling Apr 17 '22 at 09:34
-
Also, please take the [stackoverflow tour](https://stackoverflow.com/tour), which will instruct you to place the code directly in the question. – Elliott Apr 17 '22 at 09:35