E11THSPT - { cout<<"\nname...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<iostream.h> #include<conio.h> #include<string.h> # class person { char name[30]; float age; public: person(char*s,float a) { strcpy(name,s); age=a; } { if(x.age>=age) { return (x); } else { return(*this); } } void display()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { cout<<"\nname "<<name<<"\nage "<<age; } }; } void main() { person p1("xyz",37.5); person p2("abc",29.0); person p3("pqr",40.25); person p=p1.greater(p3); p.display(); p=p1.greater(p2); p.display(); }...
View Full Document

This note was uploaded on 10/25/2010 for the course CMPN SEM1 taught by Professor Thakur during the Fall '06 term at University of Mumbai.

Ask a homework question - tutors are online