pointer to member function question.
글쓴이: 하하 / 작성시간: 목, 2007/03/15 - 7:03오후
#include
class test
{
public:
void logforown(const char *, ...);
typedef void (test::*func)(const char *, ...);
func useit();
};
void test::logforown(const char *, ...)
{
printf("test");
}
test::func test::useit()
{
return &test::logforown;
}
main()
{
test ins;
// below code, how can i fix it?
// (ins.useit())->*("i have question ='%d'", 10);
// (ins.useit()).*("i have question ='%d'", 10);
}
Forums:
댓글 달기