Hi, im new in this forum and i dont speak english so please try to understand.
i wanna add a readonly property to a c++ class in a vc++2005 project. so i did this
public class someclass
{
private: int _x;
public: property int x {
int get() { return this->_x; }
}
}
and when i try to compile says "Error 3 error C3903: 'someclass::x': does not have set or get method"
so i think i need some word like "readonly" before "property" like in VB but i cant find the correct keyword, i was looking in inet, in the vs help and in this forums but cant find the answer. Thanks and sorry bout my bad english.
Visual C++11
|