implement the function split() so that it returns a vector of the strings in target that are separated by the string delimiter. For example,
split("do,re,me,fa,so,la,ti,do", ",") should return a vector with the strings "do", "re", "me", "fa", "so", "la", "ti" and "do".
Test your function split() in a driver program that displays the strings in the vector after the target has been split.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> split (string target, string delimiter);
}
|
I havn't really done vectors , so can anyone please assist me?