OPRTROVL - { count t; t.c1=c1+c.c1; t.c2=c2+c.c2; return t;...

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

View Full Document Right Arrow Icon
#include<iosream.h> #include<conio.h> class count { int c1,c2; public: void get() { cout<<"Enter the values"; cin>>c1>>c2; } void put() { cout<<"Values "<<c1<<c2; } count operator+(count); }; } count count :: operator+(count c)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { count t; t.c1=c1+c.c1; t.c2=c2+c.c2; return t; } void main() { count a1,a2,a3; a1.get(); a2.get(); a3=a1+a2; a1.put(); a2.put(); a3.put(); }...
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