P
pauldepstein
Hi all,
I saw some code like this:
unsigned short SomeFunc(unsigned short SomeNum, bool SomeBool, const
SomeClass& SomeMem,
bool(SomeClass::*AmemberFunctionOfSomeClass)(const unsigned short)
const)
{
// some code
}
I'm confused by the final parameter
bool(SomeClass::*AmemberFunctionOfSomeClass)(const unsigned short)
const
This parameter seems to have type pointer-to-function However,
here, the parameter is pointer-to-function where the function in
question is specific -- i.e the function in SomeClass called
AmemberFunctionOfSomeClass
This seems to me to contradict the whole idea of a parameter because
the parameter in question is a pointer to a specific function not a
pointer-to-function which varies according to the function that is
input.
Thanks for your help in understanding what is going on here,
Paul Epstein
I saw some code like this:
unsigned short SomeFunc(unsigned short SomeNum, bool SomeBool, const
SomeClass& SomeMem,
bool(SomeClass::*AmemberFunctionOfSomeClass)(const unsigned short)
const)
{
// some code
}
I'm confused by the final parameter
bool(SomeClass::*AmemberFunctionOfSomeClass)(const unsigned short)
const
This parameter seems to have type pointer-to-function However,
here, the parameter is pointer-to-function where the function in
question is specific -- i.e the function in SomeClass called
AmemberFunctionOfSomeClass
This seems to me to contradict the whole idea of a parameter because
the parameter in question is a pointer to a specific function not a
pointer-to-function which varies according to the function that is
input.
Thanks for your help in understanding what is going on here,
Paul Epstein