Saturday, May 22, 2010

Is there a way to break up a string into groups in c++?

I cant understand your question. On what basis you want ot create groups.


eg: group of vowels, consonents etc. Clarify it

Is there a way to break up a string into groups in c++?
I know C++ is similar to Java in many ways, but not exact. I don't know any C++, but in Java if you want to split up a String value, you can use the substring(int x, int y) method and store the values to a String[] (Array)..





String x = "Hello World!";


System.out.println(substring(3,7));





OUTPUT: lo W

jasmine

No comments:

Post a Comment