C1396: No pointer to STATIC member: use classic pointer

[ERROR]

Description

Syntax of pointer to member cannot be used to point to a static member. Static member have to be pointed in the classic way.

Example
  int glob;

  
  class A{

  
  public:

  
    static int a;

  
    static void fct(void){}

  
  };

  
  void main(void){

  
    int A::*pmi = &A::a;

  
    void (A::*pmf)() = &A::fct;

  
  }

  
Tips

Use the classic pointer to point static members

  class A{

  
  public:

  
    static int a;

  
    static void fct(void){}

  
  };

  
  void main(void){

  
    A aClass;

  
    int *pmi = &aClass.a;

  
    void (*pmf)() = &aClass.fct;

  
  }