Thursday, 11 April 2013

INLINE FUNCLTION IN C++

/*
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   :::::  THIS PROGRAM ELOBRATE THE CONCEPT OF INLINE FUNCTION  :::::
   :::::  IN C++ LANGUAGE PUBLIC BY DX PANCHAL AT MCA LAB       :::::
   :::::  ON DATE >11/04/2013                                   :::::
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

*/
// HEADER FILE DECLATION
#include<iostream.h>
#include<conio.h>
#include<dos.h>
// CLASS DECLARATION

class temp
{
  public:
     int a,b;
     inline int sum(int x,int y)
     {
      a=x;
      b=y;
      return(a+b);
     };


};
// END OF CLASS
void main()
{
   clrscr();
    temp t1;
    cout<<"\n\t\tVALUE FROM INLINR FUNCTION\n\t\t"<<t1.sum(10,20);


   getch();


}

No comments:

Post a Comment

How to change Background color by selecting color from Listview

activitymain.xml file::> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xm...