Thursday, 21 July 2011

PROGRAM to explain the inline function in c++

Do you like this post?
#include
#include
inline float sum(float x,float y)
{
return(x+y);
}
inline float diff(double p,double q)
{
return(p-q);
}
void main()
{
float a=67.986;
float b=12.89;
clrscr();
cout<<"\n a : "< cout<<"\n b : "< cout<<"\n The sum is: "< cout<<"\n The difference is : "< getch();
}

No comments:

Post a Comment