//******************************************* //overloading '>>' to work with object //******************************************** #include #include using namespace std; //--------------------------------------------------- class identity{ char name[10]; char surname[10]; int id; public: identity(){}; identity(char *na,char *sur,int i){ strcpy(name,na); strcpy(surname,sur); id=i; } friend istream &operator>>(istream &stream, identity &o); friend ostream &operator<<(ostream &stream, identity o); }; //--------------------------------------------------- istream &operator>>(istream &stream, identity &o){ cout<<"insert name "; stream>>o.name; cout<<"insert surname "; stream>>o.surname; cout<<"insert id "; stream>>o.id; return stream; } //------------------------------------------------------- ostream &operator<<(ostream &stream,identity o){ stream<<"name "<>ob1; cin>>ob2; cin>>ob3; cout<