Monday 11 August 2014

What is inline Function in C++

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

C++ Programming
InLine function in C++

Share it Please
asad

About Author!

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.

2 comments: Post Yours! Read Comment Policy!▼
Important Note:
We have Zero Tolerance to Spam. Chessy Comments and Comments with Links will be deleted immediately upon our review.

  1. Good I have didn't know about too much that functions Use Thanks

    ReplyDelete
    Replies
    1. Thanks Brother being with us Keep in touch we will uploaded as these function very Soon :)

      Delete