????D ????
???????????????????????? get ?? set????? get ?? set ?????????÷????????????
????class Abc
????{
????void property(int newproperty) { myprop = newproperty; }  // set
????int property() { return myprop; }   // get
????private:
????int myprop;
????}
??????????
????Abc a;
????a.property = 3;  // ????? a.property(3)
????int x = a.property; // ????? int x = a.property()
?????????? D ?????????????????????????????????????????????????????????????????????????????????????????????????????????????幻???????????????? get ?? set ??????????????????????‘????’??????????п?????ò?????????????????????????????????Щ?????????????????????ú???????????????????
??????????
????C++ ????
??????????????????????????????????????????????顣??????????????????????????

template<int n> class factorial
{
public:
enum { result = n * factorial<n - 1>::result };
};
template<> class factorial<1>
{
public:
enum { result = 1 };
};
void test()
{
printf("%d/n"?? factorial<4>::result); // ????? 24
}
????D ????
????D ??汾???????????????????????????????????????Χ???????????????
template factorial(int n)
{
enum { factorial = n* .factorial!(n-1) }
}
template factorial(int n : 1)
{
enum { factorial = 1 }
}
void test()
{
printf("%d/n"?? factorial!(4)); // ????? 24
}