c++: Turn string separated by comma into a vector of strings
without using loops
1. Write a function that takes a string with values separated by
commas and return a vector of strings of those values
Do not use for loops, while loops, or
for_each
_________________________________
String: "5 cats,7 dogs,all"
should return vector
{"5 cats","7 dogs","all"}
_____________________________
String: "5 apples,,2 bananas,none,,1 fish"
should return vector
{"5 apples","","2 bananas","none","","1 fish"}
c++: Turn string separated by comma into a vector of strings without using loops 1. Write a function that takes a string
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am