customergroup.h
来自「数据结构」· C头文件 代码 · 共 30 行
H
30 行
#ifndef _customerGroup
#define _customerGroup
#include"random.h"
class customerGroup
{
public:
const int groupsize;
customerGroup();
int orderSize();
};
customerGroup::customerGroup():groupsize(randgen.between(1,5))
{
}
int customerGroup::orderSize()
{
int scoops=0;
for(int i=0;i<groupsize;i++)
scoops+=randgen.between(1,3);
return scoops;
}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?