C++ -- how to define a function pointer pointing to a static member function?
<pre><code>#include "stdafx.h"

class Person;
typedef void (Person::*PPMF)();

// error C2159: more than one storage class specified
typedef static void (Person::*PPMF2)();  

class Person
{
public:
    static PPMF verificationFUnction()
    { 
        return &amp;Person::verifyAddress; 
    }

    // error C2440: 'return' : cannot convert from 
    // 'void (__cdecl *)(void)' to 'PPMF2'
    PPMF2 verificationFUnction2()               
    { 
        return &amp;Person::verifyAddress2; 
    }
private:
    void verifyAddress() {}

    static void verifyAddress2() {}
};

int _tmain(int argc, _TCHAR* argv[])
{
    Person scott;

    PPMF pmf = scott.verificationFUnction();
    (scott.*pmf)();
    return 0;
}
</code></pre>

<p>Question: I need to define a function pointer PPMF2 to pointing to a static member function verifyAddress2. How can I do it?</p>

<p>Thank you</p>

<p>// Update for Xeo ====================</p>

<pre><code>#include "stdafx.h"

class Person;
typedef void (Person::*PPMF)();
typedef void (Person::*PPMF2)();

class Person
{
public:
    static PPMF verificationFUnction()
    { 
        return &amp;Person::verifyAddress; 
    }
    PPMF2 verificationFUnction2()
    { 
        return &amp;Person::verifyAddress2; 
    }
private:
    void verifyAddress() {}

    static void verifyAddress2() {}
};

int _tmain(int argc, _TCHAR* argv[])
{
    Person scott;

    PPMF pmf = scott.verificationFUnction();
    (scott.*pmf)();

    return 0;
}
</code></pre>
