I am trying to measure savings as an example for a school project and I really don't know what I did wrong of course adding the if statement inside the function will not work since it can't call itself
    #include <iostream>
    using namespace std;
    int main(){
 struct worker{
    int salary;
    float taxperc;
    int bills;
    int home_needs;
    int bonus;
    bool measure;
    void saving(){
        float tax = (salary/100)*taxperc;
        cout << salary - tax -bills-home_needs  << endl;
    }
    if (measure)
        saving();
};
worker me = {50000, 2.5, 150, 3000, 0, true};
}
 
    