Add characters into a string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ritchie75
    New Member
    • Mar 2010
    • 1

    Add characters into a string

    How do i add characters into a string?

    Ex: abc cde efg asdfas asdf asdf wer gher

    add "," to each word except first one.

    abc cde, efg, asdfas, asdf, asdf, wer, gher
  • whodgson
    Contributor
    • Jan 2007
    • 542

    #2
    string s1= {--------------}
    string s2={........... ......)
    string s3= s1+s2
    cout<<s3 //prints ------------............... ...

    Comment

    Working...