string splitter
I have made a string splitter it can split string into vector of any numeric type. https://code.sololearn.com/cuz6gSCzO2co/?ref=app second approach :string is splitted to smaller strings like : "abc def ghi" => {"abc","def","ghi"} delim=' ' https://code.sololearn.com/cxr6SqIQOPGi/?ref=app but spliting into strings isn't possible using same algorithm as that for numeric types because if I read data to a string it'll read entire line without caring about delimeter and datatype.(read first code to understand what I mean) Both approaches are different. If I try to solve first problem using second algo I'll have to convert all strings to numbers. like "29" =>29 which isn't convenient as I need to work with multiple types (int, float, double) in same function and I'll not be able to use templates. I wish I could overload both functions but I'm unable to do that also because both have same parameters. I want more generalized way of splitting strings. It'll be great if first approach can work for std::string