如何使用 Windows 的 CreateWindow(...style | style,...) 之类的标志创建函数,例如 createnum 函数:
int CreateNum(flag flags) //???
{
int num = 0;
if(flags == GREATER_THAN_TEN)
num = 11;
if(flags == EVEN && ((num % 2) == 1)
num++;
else if(flags == ODD && ((num % 2) == 0)
num++;
return num;
}
//called like this
int Number = CreateNum(GREATER_THAN_TEN | EVEN);
这可能吗?如果可以,怎么做?