cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : General C++ Programming : Adding characters
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Articles
Lounge
Jobs

-

post  Adding characters

jobuny (9)
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?
|
rpgfan3233 (111)
Well, except for the typo in your code (String ouptut), it is working on the C++ end.
|
jobuny (9)
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.
|

This topic is archived - New replies not allowed.
Home page | Privacy policy
© cplusplus.com, 2000-2008 - All rights reserved - v2.2
Spotted an error? contact us