You only declared A::i, need to define A::i before using it.
class A  
{ 
public:     
  static int i;
  static void init(){
     i = 1;  
  }
 };
int A::i = 0;
int WINAPI WinMain (HINSTANCE hThisInstance,
                HINSTANCE hPrevInstance,
                LPSTR lpszArgument,
                int nFunsterStil)
{
  A::i = 0;
  A::init();
  return 0;
}
Also your init() function should return a value or set to void.
You have declared A::i inside your class, but you haven't defined it. You must add a definition after class A
class A {
public:
    static int i;
    ...
};
int A::i;
    
                If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With