Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Inline function(oops)
1. Inline function:
Inline function is the optimization technique used by
the compilers. It is a function which is declared using
inline keyword or within the class. The function which
is declared within the class is said to be inline function
if it satisfies following conditions:
-function should not have any return statements.
-function should not be recursive function.
-function length should be short.
-function should not have any static variable.
is considered as inline function by compiler.
Inline function can only be requested to compiler, a
user can only request to comlier to make a particular
funtion as an inline function, its depend on the compiler
to make it as an inline function or not. An inline
function is used to short the execution time. Its main
task is that, it copy the body part of an inline function
where it is called.
Its advantages are as under:
2. - It shorter the execution time.
- It does not require function calling overhead
- It saves time.
Its disadvantages are as under:
- It increases the length of our file.
- It may make our file unreadable.
e.g:
#include<iostream>
using namespace std;
class number
{
int n;
public:
void setdata()
{
3. n=10;
}
void display()
{
Cout<<n;
}
};
In above example, both of the functions will be
considered as inline function by the compiler as it
satisfies all conditions.