Sorry, I still don't have any clue what is wrong. I also don't understand what is wrong with "incrementing i iterator and at same time decrementing ptr_size2"? Both are different integers, so incrementing iterator i won't affect ptr_size2 and vice versa.
yes sure that's what i did and got the result 1...50...1. It's weird and i'm sure i have checked my loops a couple of times. Perhaps any other alternatives?