//Program to implement the use of inline functions
#include<iostream.h>
#include<conio.h>
class sample
{
private:
static int counter;
public:
inline void display();
};
int sample:: counter;
inline void sample::display()
{
cout<<"content of static variable are"<<counter<<endl;
}
void main()
{
clrscr();
sample obj;
obj.display();
getch();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.