How to assign an input variable to a member variable with the same name?

 

Hi there,

I would like to assign a value from an input variable to a member variable with the same name.

Here is the code:

class Config {
    public:
    StartLotOption START_LOT_TYPE; 
    //fill from inputs
    void fillFromInputs()
    {  
        this.START_LOT_TYPE = START_LOT_TYPE; //Assign the global input to the local member with same name
    }
};

This does not seem to work. Any ideas?

(unfortunately I probably wont be able to use different names).

Maybe there is some syntax like INPUTS.START_LOT_TYPE  ?


Thank you very much

 

I'm not sure but try this ...

class Config {
    public:
    StartLotOption START_LOT_TYPE; 
    //fill from inputs
    void fillFromInputs()
    {  
        START_LOT_TYPE = ::START_LOT_TYPE; //Assign the global input to the local member with same name
    }
};