Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- class student
- {
- private:int age;
- string name;
- public:student(string="Muchu",int=18);
- bool operator==(student);
- }
- student::student(string n,int m)
- {
- name=n;
- age=m;
- }
- bool operator==(student &s)
- {
- return(age==s.age&&s.name==name);
- }
- int main()
- {
- student a;
- cout<<"Much"<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment