Q: Return Initial-state only once may you have an idea.
I want to call a discrete time function "execute". 
First call: "execute" returns an init-state
Every next call: "execute" returns a calculated value.
My idea with a "Initflag" (runtime):
while( true ){
  myValue = myObj.execute();
  doSomethingWith( myValue );
}

//Anywhere in a Class
public:
   float execute(){
     if( InitFlag ){
       InitFlag  = false; //now permanent set to false
       return 42;
     }
     else{
       return value = value + 42;
     }
}
private:
  bool InitFlag = true;
  float value = 0;
}

My Question:
Is there a way to implement the "init" to "NormalExecution" -switchin to compiletime ? Without asking a flag permanently ?
Exists a better "Keyword" / "Description" for this problem ?
Thanks for your help
//Bigger view

// One of my algorithm (dont take it, it´s not tested)

/// Integrator Euler-Backward 1/s Z-Transf. K*Ts*z/(z - 1) with K := slope, Ts := SampleTime
template<class T>
class IntegratorEB{//Euler Backward
public:
///CTOR
/// @brief Constructor
IntegratorEB(const T& K)
: Ts_(1.0), u_(0.0), y_(0.0), h_(K*Ts_), InitFlag_(true) {}
///END_CTOR

///ACCESS
    /// @brief copy and save input u
    void Input(const T& u){
        u_ = u;
    }

    //TODO First call should not change y_
    /// @brief calculate new output y 
    void Execute(){
        if( InitFlag ){
          y_ = y_; //or do nothing...
          InitFlag = false; 
        }
        else
          y_ = y_ + h_ * u_;  // y[k] = y[k-1] + h * u[k];
    }

    /// @brief read output, return copy
    T Output() const{
        return y_;
    }
    /// @brief read output, return reference
    const T& Output() const{
        return y_;
    }
///END_ACCESS
private:
    T Ts_;  //SampleTime
    T u_;   //Input u[k]
    T y_;   //Output y[k]
    T h_;   //Stepsize

    bool InitFlag_;

};

Whished use of the class 
1.Init 
2. Loop calls any algorithmen in the same way
2.1 Input
2.2 Execute
2.3 Output

An example for the call with another algorithm:
std::cout << "Class Statespace"; //Ausgabe  
for(int t = 1; t <= 50; ++t){
    DCMotor.Input(Matrix<float, 1, 1>(u));
    DCMotor.Execute();
    y = DCMotor.Output();
    std::cout << "t = " << t << " y = " << y; //Ausgabe
}

My Question:
I like to handle each algorithm in the same way. First call of execute supply the Initstate. For the example on top it works(depend on the algorith-structure). For my class "IntegratorEB" not. (or just with asking a runtime-flag ?! )
Hope it will be clearly. 

A: // All instances share the same "value"
class foo {
public:
   float execute(){
       static float value = 0;
       return value = value + 42;
    }
 };


// Each instance has a separate "value"
class bar {
public:
   bar() : value(0) {}
   float execute(){
       return value = value + 42;
    }
private:
   float value;
 };

