Y
ypjofficial
Is there any possibility of invoking the member functions of a class
without creating an object (or even a pointer to ) of that class.
eg.
#include <iostream.h>
class test
{
public:
void fun()
{
cout<<"Inside test::fun\n";
}
};
I want to call fun() of class test without creating
test t or even test * ptr;?
I searched on the net for the convincing answer but didn't get any.
(http://www.devx.com/tips/Tip/15846 )
Or is this a totally insane question? (I won't mind if anyone agrees
with that
..)
Thanks and Regards,
Yogesh Joshi
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
without creating an object (or even a pointer to ) of that class.
eg.
#include <iostream.h>
class test
{
public:
void fun()
{
cout<<"Inside test::fun\n";
}
};
I want to call fun() of class test without creating
test t or even test * ptr;?
I searched on the net for the convincing answer but didn't get any.
(http://www.devx.com/tips/Tip/15846 )
Or is this a totally insane question? (I won't mind if anyone agrees
with that
Thanks and Regards,
Yogesh Joshi
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]