Structure of the Problem Requirements
In this problem we will learn how to use the inline Function in C++ and its working . inline Function is mostly used when we working on the classes and compiler jump here and there for collection the codes . The Structure of the inline function is that the compiler make a copy of each inline function and keep them every where ,where these function calls in main class. The technique save the time in very complicated application where time (nano seconds ) matter a lot .
Source Code
#include<iostream>
using namespace std;
inline int findmax (int ,int );
int main ()
{
int x,y;
cout<<" Enter Your Number : \n ";
cin>>x;
cout<<" Enter Your Number : \n ";
cin>>y;
cout<<" The Bigger Number is : "<<findmax(x,y);
}
inline int findmax (int a,int b)
{
return ( a > b ) ? a : b;
}
Output of the Program
InLine function in C++ |
Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.
Good I have didn't know about too much that functions Use Thanks
ReplyDeleteThanks Brother being with us Keep in touch we will uploaded as these function very Soon :)
Delete