CONST - { return (a+b); } void main() { ab a1,a2(4),a3(6,7);

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> class ab { int a,b; public: ab(); ab (int,int y=2); int add(); }; ab::ab() { a=2; b=3; } ab::ab(int x,int y) { a=x; b=y; } int ab::add()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { return (a+b); } void main() { ab a1,a2(4),a3(6,7); cout<<a1.add()<<endl; cout<<a2.add()<<endl; cout<<a3.add()<<endl; }...
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