#include<iostream.h>
#include<conio.h>
class demo
{
public:
void fun()
{
cout<<"\n This is a demo 1";
}
void fun(char *i)
{
cout<<"\n This is a demo "<<i;
}
};
void main()
{
clrscr();
demo obj;
obj.fun();
obj.fun("Hello ");
getch();
}
#include<conio.h>
class demo
{
public:
void fun()
{
cout<<"\n This is a demo 1";
}
void fun(char *i)
{
cout<<"\n This is a demo "<<i;
}
};
void main()
{
clrscr();
demo obj;
obj.fun();
obj.fun("Hello ");
getch();
}
No comments:
Post a Comment