I don't know what is happening

When I print the values inside the function , they are right but if I push them into a vector and print them in main , the answer is changed to last char of every integer.