Hi,
I have created a Class for a DLL as follows :
Class Test
{
public:
private:
long lng_Variable;
}
I can write a method to give access to the lng_Variable, but I would prefer to write a Property so that my clients can write things like :
Test Tester;
Tester.Variable = 4;
instead of Tester.Variable(4);
How do I go about writing properties within C++ ?
Thanks
Mark
I have created a Class for a DLL as follows :
Class Test
{
public:
private:
long lng_Variable;
}
I can write a method to give access to the lng_Variable, but I would prefer to write a Property so that my clients can write things like :
Test Tester;
Tester.Variable = 4;
instead of Tester.Variable(4);
How do I go about writing properties within C++ ?
Thanks
Mark