how to use interrupt in class

hello
I’m going to make a library and I must use interrupt
I have some trouble in the class and attaching interrupt pin
this is my code:

class Project {
    int temp;
    int ldr;
    int damp;
    int a;
    int analogtemp;
    int LUX;
    int DAMP;
    unsigned long last_time;
  public:
    Project(int temppin, int ldrpin, int damppin) {
      temp = temppin;
      ldr = ldrpin;
      damp = damppin;
      a = 0;
      void Attach();
    }
    void Attach(int Pin) {
      attachInterrupt(digitalPinToInterrupt(Pin), PIR, RISING);//the error is for this line
    }
    void ApplyTemp() {
      unsigned long current_time = millis();
      if (current_time - last_time < 60000) {
        if (current_time - last_time > 1000) {
          analogtemp =  analogRead(temp);
        }
      }
      else {
        Serial.print("temperature:");
        Serial.print(analogtemp / 9.31); //convert to celsius
        Serial.print("\n");
        last_time = current_time;
      }
    }
    void ApplyLdr() {
      unsigned long current_time = millis();
      if (current_time - last_time < 60000) {
        if (current_time - last_time > 1000) {
          int analogldr =  analogRead(ldr);
          LUX = map(analogldr, 0, 1023, 0, 3000); //convert to lux
        }
      }
      else {
        Serial.print("light:");
        Serial.print(LUX);
        Serial.print("\n");
        last_time = current_time;
      }
    }
    void ApplyDamp() {
      unsigned long current_time = millis();
      if (current_time - last_time < 60000) {
        if (current_time - last_time > 1000) {
          int analogdamp =  analogRead(damp);
          DAMP = map(analogdamp, 0, 1023, 0, 100); //humidity percent
        }
      }
      else {
        Serial.print("humidity:");
        Serial.print(DAMP);
        Serial.print("%");
        Serial.print("\n");
        last_time = current_time;
      }
    }
    void PIR() {
      Serial.println("somebody passed");
    }
};
Project bathroom(A0, A1, A2);
Project bedroom(A3, A4, A5);
void setup() {
  Serial.begin(9600);
  bedroom.Attach();
}

void loop() {
  // put your main code here, to run repeatedly:
  bathroom.ApplyLdr();
  bedroom.ApplyTemp();
}

and this is the error:

exit status 1
invalid use of non-static member function

can anyone help me?

invalid use of non-static member function

So, make it static.

Which instance of your class should be used to call the handler? How can the class definition know? When the interrupt fires should it call bathroom.PIR() or bedroom.PIR()? It can only call one. The only way it can know is if the method is static so all instances share the same function.

It is a bad idea to print within an interrupt routine, as follows:

   void PIR() {
      Serial.println("somebody passed");
    }

black_pnx:
hello
and I must use interrupt

Why ?

Why?

Homework assignment.