operator [] method
Implementation
int operator [](other) {
switch (other) {
case 'mode':
return mode;
case 'want':
return _want;
case 'given':
return _given;
default:
return 0;
}
}
int operator [](other) {
switch (other) {
case 'mode':
return mode;
case 'want':
return _want;
case 'given':
return _given;
default:
return 0;
}
}