0
how do I concatenate two strings entered by the user having spaces in both the strings and display the same??
please write code for it??
4 Respuestas
0
string A;
string B;
cin >> A >> B;
cout << A+B << endl;
Do you mean with the space or without?
0
with spaces
0
use getline() function it includes spaces and counts them as well
0
but it adds an extra space while concatenating
I tried it.