Click here to Skip to main content
15,894,106 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Theres this function of a String class

void split(char token, String *&, int &ntokens);

And it should should split the string according to given token and store all substrings in a dynamic array passed as second argument, and return ntokens in third argument.

Unfortunately, I don't understand the problem neither the description given as well as well as the arguments of the function. Help would be appreciated.

Note: We are not allowed to use cstring functions.

What I have tried:

I don't understand the problem, therefore, haven't tried it.
Posted
Updated 6-Mar-16 1:00am
v3
Comments
Richard MacCutchan 4-Mar-16 11:29am    
You should discuss this with your tutor to find out what it is all about.

1 solution

you can begin implementing your function with strtok[^] or any appropriate version to your compiler , eg : strtok_s

There is sample at the bottom of function reference page , that might help you to understand how to use it
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900