I discovered a neat feature years ago while i was searching something on google. It enabled the usage of a sort of "function" to control access to a member variable but i can't seem to find it anymore. (I am also not sure if this was a c++ feature or only specific to the msvc compiler because it was highlighted red in visual studio as if it was label or something)
The theory behind it was something similar to this:
class A
{
public:
.test(int value)
{
priv = value;
}
private:
int priv = 0;
};
...
A a;
a.test = 14; // Sets priv to 14 ! note no () needed after test´
Does anybody know what it is / was?