diff --git a/CopyStringObject.cpp b/CopyStringObject.cpp new file mode 100644 index 0000000..50a936a --- /dev/null +++ b/CopyStringObject.cpp @@ -0,0 +1,17 @@ +#include +using namespace std; + +int main() +{ + string s1, s2; + + cout << "Enter string s1: "; + getline (cin, s1); + + s2 = s1; + + cout << "s1 = "<< s1 << endl; + cout << "s2 = "<< s2; + + return 0; +}