C++ string object; add whitespace controll character
Friends,
I am trying to add white space into C++ string, but I have no clue. Is that possible? Please help me. Thanks Suresh |
try with gets() function. and take care about string over flow.
|
Thanks for response .. can you please elabaorate...
I want to add character by character into C++ string. Is there any way I can specify it saying I am adding controll character? Thanks Suresh |
you can use any of getchar(), getche() getch().
|
Maybe you mean something like
Code:
the_string += ' '; // adding a space |
Or:
Code:
std::string my_string = "testdata"; |
All times are GMT -5. The time now is 05:25 PM. |