hetali Said..
When we use inline function we first declare the keyword(INLINE).Then we declare its datatype then write or pass any arguments.we also assign the value.It cant take any complexity then it's execution speed is fast.
ADVANTAGES:
*when we create any program and if their is a some activity or criteria is occur more then one time then it is very useful.
*It is very easy to use in program.
DISADVANTAGES:
*In this function we never create any complexity.like we never use compound statement,for loop,goto statement,static variables,switch case.
so that time it cant helpful.
*If we create any complexity then it cant understand that condition & it saw us to not any error but it declare us to warning that we cant use to or create complexity. That time Inline function is treat in simple UDF.
EXAMPLE:
#include
#include
Inline int cube(int l)
{
return l*l*l;
}
void main()
{
clrscr();
int a=10;
int c=cube(a);
cout<<"The answer is c:";
getch();
}