From c51c74067861178dc6cdf527e834d6a4b2477512 Mon Sep 17 00:00:00 2001 From: Rana MS <90625605+Ranamalsingh12@users.noreply.github.com> Date: Tue, 18 Oct 2022 22:25:26 +0530 Subject: [PATCH] Create CopyStringObject.cpp --- CopyStringObject.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 CopyStringObject.cpp 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; +}