Thread
:
copy one string to another??
View Single Post
xpi0t0s
Mentor
8Mar2012,06:34
Your chosen approach is not the correct one. Simply use the assignment operator:
Code:
string str1="Hello"; string str2=str1; cout<<str2;
Output should be "Hello".