S
Sharpdew
class Test
{
double i;
public:
void fun(){}
void foo(void)
{
cout << "as";
}
};
int main()
{
Test t;
t.foo; // mean what?
Test::foo; // mean what?
cout << &Test::foo << endl; // output 1, why?
cout << &Test::fun << endl; // output 1, too, why?
return 0;
}
{
double i;
public:
void fun(){}
void foo(void)
{
cout << "as";
}
};
int main()
{
Test t;
t.foo; // mean what?
Test::foo; // mean what?
cout << &Test::foo << endl; // output 1, why?
cout << &Test::fun << endl; // output 1, too, why?
return 0;
}