Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class suresh{
- int a;
- public:
- void read(){
- cout<<"Enter value of a ";
- cin>>a;
- }
- friend void display(suresh s1);
- };
- void display(suresh s1){
- cout<<s1.a;
- }
- int main()
- {
- suresh c1;
- c1.read();
- display(c1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment