FRIENDFN - cin>>b void add(a p x q float r r=float(p.c...

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 x; class a { int c; public: void get(); friend void add(a,x); }; } class x { int b; public: void input(); friend void add (a,x); }; } void a::get() { cin>>c; } void x::input()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { cin>>b; } void add (a p, x q) { float r; r=float(p.c + q.b)/2; cout<<r; } void main() { clrscr(); a a1; x x1; a1.get(); x1.input(); add(a1,x1); getch(); }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online