return true;
}
main也不含糊,只为体现Permutation的用法。
int main()
{
const int N = 3;
Permutation perm(N);
const char* sTests[N] = html1\06\clip_image004.gif" width="15" />{"零", "一", "二"};
do
{
for (int i=0; i
cout << endl;
}while(perm.ToNext());
return 0;
}
CLASS真是好东西,如果不用C++,而用C的话,我也不知道代码会是什么样子,起码不会这么易于表达,除了设计好算法和数据结构,还必须多花些心思琢磨代码的设计,这不是一件快乐的事情,而用C++写代码,则非常惬意。