赞
踩
- #include <ctime>
-
- class Worker {
- public:
- string m_name;
- int m_salary;
-
- };
-
- void createWorker(vector<Worker>& v) {
- string name_seed = "ABCDEFGHIJ";
- for (int i = 0; i < 10; i++) {
- // 创建员工信息
- Worker w;
- string name = "员工";
-
- // 写入员工信息
- w.m_name = name + name_seed[i];
- w.m_salary = rand() % 10000 + 10000;
-
- // 放进员工容器中
- v.push_back(w);
- }
- }
-
- void setGroup(vector<Worker>&v, multimap<int, Worker>&m) {
- for (vector<Work
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。