Adding characters

This may be hard to explain but I'll do my best.....
I'm using an HTML based form that displays a keyboard, when the user clicks on a letter it display "you have chosen (what ever letter)" but it also still shows the same HTML page. What I need the program to do is allow users to click on multiple letters and have them display, so say the user click on T it'll show "you have chosen T" then if they click on H next it'll display you have chose TH and so on (basically so they could spell out words). the problem I'm having is my C++ code is adding the letters but it's over writing the letters. So if the user clicks on T it'll show T but then if they click on H it'll replace T with H instead of showing TH.

the way I have it coded right now is:
String ouptut;
char input;

output += input;

cout << output;

I was under the impression that if I set it up this way it would continue to add letters to output that it received from input? am I thinking incorrectly here?
Well, except for the typo in your code (String ouptut), it is working on the C++ end.
right should have been string output sorry 'bout that

thanks for the reply, I'll start looking into the other sections of my program. Must be something on the HTML side, but I wasn't completely sure.
Topic archived. No new replies allowed.