Sunday, 15 September 2013

how to split a C++ string to get whole string individually and some parts/characters of it

how to split a C++ string to get whole string individually and some
parts/characters of it

My question is, how can I split a string in C++? For example, I have `
string str = "[ (a*b) + {(c-d)/f} ]"
It need to get the whole expression individually like [,(,a,*,b,......
And I want to get the brackets only like [,(,),{,(,),},] on their proper
position
How can I do these with some easy ways

No comments:

Post a Comment