firstly i want to thank for someone who reply me
my problem is
Code:// Join solutions together as string, and brek up after two numbers. stringstream numbers; // Insert integer into stringstream numbers <<numLowerCaseLetter(name)<<sumAscii(name)<<lastValue<<counter<<sum; // Convert stringstream into string string str = numbers.str(); for(int i = 0; str[i]; i=i+2) { cout<<str.substr(i,2)<<" "; }
EXPLANATION OF MY PROBLEM::
output is: 55 20 11 84 18
for the code above, it is to split strings after 2 numbers.
when i enter str[1] it displays only 5. how can i do to make it display 55 when i asked for str[0]?