1. Write a program in C++ to tokenize (split) a cstring into multiple tokens using pointers. The string is to
be tokenized based on a delimiter (a special character; could be space, dot, or any other character).
Your program to take two inputs from the user: the string to be tokenized, and the delimiter.
void CStringTokenizer(char * str, char delim, vector<string> & result); //prototype
Char Array
Welcome to C++ World
Function
CStringTokenizer
delim is a space
Array of Strings
Welcome
To
C++
World
Test Data #1:
Input the string: Welcome to C++ World
Input the delimiter: //space
Expected Output for Test Data #1:
Your tokens are:
1.Welcome
2.to
3.C++
4.World
Test Data #2:
Input the string: EvCC_was_founded_in_1941_and_educates_more_than_19,000_students_every_year
Input the delimiter:
Expected Output for Test Data #1:
Your tokens are:
1.EvCC
2.was
3.founded
4.in
5.1941
6.and
7.educates
8.more
9.than
10.19,000
11.students
12.every
13.year