class object
{
public:
void check()
{
std::cout<<\"I am doing ok...\"<
It's even funnier than that. This compiles & runs nicely:
#include
using namespace std;
class object {
public:
void check() {
cout << "I am doing ok..." << endl;
}
};
int main() {
object *p = (object*)0;
p->check();
return 0;
}
On to the shell:
$ g++ -o t t.cc $ ./t I am doing ok... $
:) You don't actually have to have an object to call this method! cheers, h