cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
String
String
Jan 6, 2016 at 10:08am UTC
GibsRey
(20)
How to make a space character in string?
Jan 6, 2016 at 11:11am UTC
Code Apperentice
(229)
What do you mean by "space character"? You can just append " " to a string if you want a whitespace...
Last edited on
Jan 6, 2016 at 11:11am UTC
Jan 6, 2016 at 11:38am UTC
ThanosRoot
(2)
you can just write: std::string space = " " /* Blank space */
if that's what you mean...
Jan 6, 2016 at 12:56pm UTC
codekiddy
(783)
If you mean inserting a white space then:
1
2
3
string str =
"helloworld"
; str.insert(str.begin() + 5,
' '
);
// str is now "hello world"
Topic archived. No new replies allowed.