C++ me g++

K Efstathiou cefstat at phys.uoa.gr
Thu May 3 16:56:01 EEST 2001


An baleis 
int (AClass::*pFunc)() = &AClass::aFunc;
anti gia 
int (*pFunc)()=myClass.aFunc;
doulevei mia xara. O basikos logos einai oti h signature ths aFunc den einai
int aFunc() opws tha perimene kaneis
alla kati sto styl int aFunc(AClass*). Mhn xehnas oti o compiler pernaei kai 
tin metabliti 'this' kathe fora pou kalei tin aFunc. 

BTW, to
int (AClass::*pFunc)() = &myClass.aFunc;
den doulevei dioti:
test.cpp:14: ISO C++ forbids taking the address of a bound member
function to form a pointer to member function

K Efstathiou



More information about the Linux-greek-users mailing list