VRTLCNST - public C(int a,float b,int c,int d:A(a,B(b m=c...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<iostream.h> #include<conio.h> # class A { int x; public: A (int i) { x=i; cout<<"A initialized\n"; } void showx() { cout<<x<<endl; } }; } class B { float y; public: B (float j) { y=j; cout<<"B initialized\n"; } void showy() { cout<<y<<endl; } }; } class C:public B,public A { private: int m,n;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public: C(int a,float b,int c,int d):A(a),B(b) { m=c; n=d; cout<<"C initialized\n"; } void showmn() { cout<<"m & n "<<m<<n; } }; } void main() { clrscr(); C c(5,10.5,20,30); c.showx(); c.showy(); c.showmn(); getch(); }...
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.

Page1 / 2

VRTLCNST - public C(int a,float b,int c,int d:A(a,B(b m=c...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online