How to split a string in C++?

How to write a java recursive function to split string to small chunks?

  • I want to write a java recursive function to split string into small chunks and store them in a newly created object which has a data member that can hold a string. splitting algorithm is done. the class that holds the splited chunks are also created. I want to know how to write the object creation part. how to declare the object so that if the function was repeated for 5 times, 5 objects will be created? Thanks.

  • Answer:

    Well, you have created the class for the object. Let's say that class is named Splitstring. In that class, you should've created the constructor which has syntax: public Splitstring(*parameters*) { } The constructor constructs a new object of the class. To create an object of that class, you would call the constructor which syntax looks like this: Splitstring avariablename = new Splitstrong(*parameters*); hope that helps

Maduranga C at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.