#include <iostream> #include <string> using namespace std; class Person { private: string name; int age; public: Person(string name,int age) { this->name=name; this->age=age; } void showPerson() { cout<<name<<" "<<age<<endl; } Person(const Person& p) { name=p.name; age=p.age; } }; int main() { string a; int age; getline(cin,a); cin>>age; Person p1(a,age); Person p2(p1); p2.showPerson(); return 0; }