0

I am kind of confused how to start. I have a string "abc df3 ghk", and I want to convert it to a vector of string or char (don`t know which one should I pick, I just need to separate them) as follows: input : "abc df3 ghk" output : vector output={"abc","df3","ghk"} I am confused how can I do this, I need to do this for several lines of input, each line will be converted to a vector.

Thank you for your help.

Sarah
  • 133
  • 11
  • A good place to start is to learn about the functions offered by `std::string`. See http://en.cppreference.com/w/cpp/string/basic_string. – Michael Albers Nov 15 '16 at 02:16
  • Take out a blank piece of paper and a pen. Write down, in plain English, using simple words, a logic process for implementing this task. Then, [discuss your proposed solution with your rubber duck](https://en.wikipedia.org/wiki/Rubber_duck_debugging). Once your rubber duck agrees that your proposed solution will work, simply take what you've written down, and translate it directly into C++ code. Mission accomplished. – Sam Varshavchik Nov 15 '16 at 02:16

0 Answers0