How do i call a static member inside a static method using class ?

The logic is just to get the code working with the static methods. I am getting “undefined reference to” error how do call static members inside the methods inside a class?

The code looks like this#

class ResetValueTimer{
public :
static unsigned long calledTimeString;
static int stringCalled ;

static String resetIn(String from, String to, unsigned long seconds){
if(!ResetValueTimer::stringCalled){
ResetValueTimer::calledTimeString = millis();
ResetValueTimer::calledTimeString = 1;
}

if(millis() - ResetValueTimer::calledTimeString >= seconds){
ResetValueTimer::stringCalled = 0;
return to;
}
return from;
}

};

void setup(){

}

String foo= “HELLO WORLD”;
String boo = “BYE WORLD”;

void loop(){

foo= ResetValueTimer::resetIn(foo,boo,2000);
boo= ResetValueTimer::resetIn(boo,“NOTHING NOT CHANGE”,2000);

Serial.print("foo : “);
Serial.print(millis()/60);
Serial.print(”: "+foo);

Serial.print("| boo : “);
Serial.print(millis()/60);
Serial.println(”: "+boo);

}

You 'defined' them but did not 'declare' them.

class ResetValueTimer {
  public :
    static unsigned long calledTimeString;
    static int stringCalled;

    static String resetIn(String from, String to, unsigned long interval) {
      if (!stringCalled) {
        calledTimeString = millis();
        calledTimeString = 1;
      }

      if (millis() - calledTimeString  >= interval) {
        stringCalled = 0;
        return to;
      }
      return from;
    }
};

unsigned long ResetValueTimer::calledTimeString;
int ResetValueTimer::stringCalled;

void setup() {

}

String foo = "HELLO WORLD";
String boo = "BYE WORLD";


void loop() {

  foo = ResetValueTimer::resetIn(foo, boo, 2000);
  boo = ResetValueTimer::resetIn(boo, "NOTHING NOT CHANGE", 2000);

  Serial.print("foo : ");
  Serial.print(millis() / 60);
  Serial.print(": " + foo);

  Serial.print("| boo : ");
  Serial.print(millis() / 60);
  Serial.println(": " + boo);
}