Problem 1: You are removing elements from the stack (by calling pop()) and you are incrementing i so letter.size() and i will meet halfway.
i == 0, letter.size() == 6
i == 1, letter.size() == 5
i == 2, letter.size() == 4
i == 3, letter.size() == 3 // This breaks the loop
Problem 2: put is an empty vector so no elements can be accessed using index, put[i]. If you want to add an element to the end of a vector you can use the push_back function.
put.push_back(letter.top())
Note that you don't need to use the index i when using push_back.