Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Write A program to perform inline function program with example
- #include<iostream.h>
- #include<conio.h>
- class sum
- {
- int a,b;
- public:
- void getdata()
- {
- cout<<"Enter 1 Value\n";
- cin>>a;
- cout<<"Enter 2 Value\n";
- cin>>b;
- cout<<"Sum of This Number Are :"<<display(a,b);
- }
- inline int display(int a,int b)
- {
- return a+b;
- }
- };
- void main()
- {
- clrscr();
- sum obj;
- obj.getdata();
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement