settest.cpp
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C++ 代码 · 共 42 行
CPP
42 行
#include "base/base.h"
#include <iostream.h>
void test1 ()
{
CL_IntegerSet mySet (17, 21);
mySet += CL_IntegerSet (35, 39);
mySet += CL_IntegerSet (26, 29);
cout << "IntegerSet mySet is " << mySet << endl;
cout << "Rank of 13 is " << mySet.RankOf (13) << endl;
cout << "Rank of 17 is " << mySet.RankOf (17) << endl;
cout << "Rank of 21 is " << mySet.RankOf (21) << endl;
cout << "Rank of 25 is " << mySet.RankOf (25) << endl;
cout << "Rank of 35 is " << mySet.RankOf (35) << endl;
}
void test2 ()
{
CL_BitSet mySet (17, 21);
mySet += CL_BitSet (35, 39);
mySet += CL_BitSet (26, 29);
cout << "BitSet mySet is " << mySet << endl;
cout << "Rank of 13 is " << mySet.RankOf (13) << endl;
cout << "Rank of 17 is " << mySet.RankOf (17) << endl;
cout << "Rank of 21 is " << mySet.RankOf (21) << endl;
cout << "Rank of 25 is " << mySet.RankOf (25) << endl;
cout << "Rank of 35 is " << mySet.RankOf (35) << endl;
}
main ()
{
test1();
test2();
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?