470,833 Members | 1,631 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

how to concatenate the string

i am facing some problem in concatenating the string ...can u solve
this

Apr 10 '06 #1
2 1756

ashishnh33 wrote:
i am facing some problem in concatenating the string ...can u solve
this


std::string s1;
std::string s2;
std::string s3;

std::getline(std::cin, s1);
std::getline(std::cin, s2);

s3 = s1 + s2;

std::cout<<s3<<"\n";

Apr 10 '06 #2
Ashish,

Can you please list down the exact problem you are facing while
concatenating the strings ?

- Rahul

Jaspreet wrote:
ashishnh33 wrote:
i am facing some problem in concatenating the string ...can u solve
this


std::string s1;
std::string s2;
std::string s3;

std::getline(std::cin, s1);
std::getline(std::cin, s2);

s3 = s1 + s2;

std::cout<<s3<<"\n";


Apr 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Alessandro Rossi | last post: by
5 posts views Thread by Generic Usenet Account | last post: by
14 posts views Thread by metamorphiq | last post: by
10 posts views Thread by Aaron Hoffman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.