Im trying to do a simple string splitting function, but im having a problem returning the split string.
i got the string into strings s1, s2, s3. how do i return {s1,s2,s3}? im using brackets but the compiler is telling me
expected primary-expression before '{' token
expected `;' before '{' token
expected `;' before '}' token
even though there doesnt seem to be any problem. is doing {s1,s2,s3} even allowed?
You probably want to return type
vector<string>. Then in your function create a vector and return it as a value.