A easy questions, maybe, for you guys.
I want to define a class, which will have two members, for example, vaporPressureStatus and vaporPressure
1 2 3 4 5 6 7
|
enum vpStatus_t {nonesense, unknown, known, saturated};
class pore_t {
public:
vpStatus_t vpStatus;
double vaporPressure;
};
|
when vpStatus is nonsense and unknown, the vaporPressure should not have a value; and if I calculate out a value for vaporPressure, the vpStatus can be set as known.
I am wondering if there is any set, pair or other structure can hold this two members together, so that when I change one's value, the other guy will also change accordingly.
Thanks, if my questions is not clear, please let me know.