characters starting from 8th of v till the end of v are always a "number" (if converted to int). I want to add the "number" of previous iteration to the "number" of the current iteration.
I did not understand your original task. It is the result that you are unable clear to describe your problem. So the code I showed early is not what you need. Now I have rewritten it the following way
1 2 3 4 5 6 7
int sum = 0;
for(int j = i; j <= 1992; j++)
{
sum += std::stoi( value11.substr( 7 ) );
setStr11.insert(value11);
}
Or maybe you need the following
1 2 3 4 5 6 7
int sum = 0;
for(int j = i; j <= 1992; j++)
{
sum += std::stoi( value11.substr( 7 ) );
setStr11.insert( sum );
}