letter is always equal to 'A' that's why it never stops.
you must increase its value by one inside the while.

change this
Code:
        cout << letter << '\t' << static_cast<int>(letter++) << endl;