2009年1月19日 星期一

function pointer in c++

testFunPtr is not a static function 
testFunPtr2 is a static function

correct:
int (com_scsi_command_driver::*pt2Function)()=       &com_scsi_command_driver::testFunPtr;
int (*pt2Function)()= 
&com_scsi_command_driver::testFunPtr2;

wrong:
int (*pt2Function)()= &com_scsi_command_driver::testFunPtr;




沒有留言: