cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : General C++ Programming : This is a simple question I think
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programm...
Articles
Lounge
Jobs

-

post  This is a simple question I think

jobuny (9)
I need to set a variable to be a space. I'm using this keyboard type of program so I need the space back to actually work. So if somebody clicked on Hi (then his space and type there it would come out as Hi There I tried using sp = " "; but that doens't seem to work, it just clears out my output.

thanks
|
DiptenduDas (84)
It would B better If U could post the piece of code that U have worked out along with the problem U r facing...
|
jobuny (9)
strcat(hiddenletters, input); //input comes from my HTML page

if (hiddenletters == "SP")
{
hiddenletters = " ";
cout << hiddenletters
}

I just need it so that if the user hit SP the value will become a blank space and then if they type another letter after that would come after the space
|
jobuny (9)
I guess another way to put it would be, how can I make the output skip over by one if the space is hit....anyway you look at it, I need so that when they press the space button they get something like HI DD EN but I don't want to clear out the information already in that varriable I'm using for the output. I just want to create the space in between
|

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