Splitting a huge string in several smaller strings
Hello everyone, this is my problem:
I have a .txt file with a huge string of names, seperated like this:
"BELLA, "JONATHAN", ...
I need to operate on each name, so I want to store them in a vector, but without the " and , characters. I've made an algorithm, but it seems there is no easy way to do this:
- take note of first index of name
- check for next index until you hit a "
- cut of the string from index i till i + j
I thought of storing all seperate characters of a single name in a temporary vector<char>, then compiling those characters in a string with a for loop, is this possible?
Thanks in advance!