• 大小: 1.62MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-09
  • 语言: C/C++
  • 标签: C++  动物园  

资源简介

学C++时候留的一个较麻烦的作业,做起来还有点费劲,希望大家多多指教吧

资源截图

代码片段和文件信息

#include“stdafx.h“
#include “zoo.h“
#include
#include
#include
using namespace std;

string FoodSeller::foodkind[3] = { “peanuts““carrots““bananas“ };
double FoodSeller::foodamount[3] = { 1000070004000 };
double FoodSeller::foodprice[3] = { 0.20.30.5 };


int main()
{
srand(time(NULL));
Zoo zoo;
for (int i = 1; i < 20; i++){
int number_adult = rand() % 20 + 20;

if (zoo.check_close() == 0){
zoo.setzoo_newday(i number_adult);
zoo.buytickets();
zoo.buyfood();
zoo.fed_food();
zoo.check_animal_dirty();
zoo.dayover();
}
else{
zoo.showall();
break;
}
}
system(“pause“);
return 0;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-04-15 23:45  动物园\
     目录           0  2018-04-16 17:17  动物园\.vs\
     目录           0  2018-04-16 17:17  动物园\.vs\ConsoleApplication1\
     目录           0  2018-04-16 17:17  动物园\.vs\ConsoleApplication1\v15\
     文件       14848  2018-04-16 17:17  动物园\.vs\ConsoleApplication1\v15\.suo
     文件      241664  2018-04-16 17:17  动物园\.vs\ConsoleApplication1\v15\Browse.VC.db
     目录           0  2018-04-16 00:10  动物园\.vs\ConsoleApplication1\v15\ipch\
     文件     3604480  2018-04-16 00:23  动物园\.vs\ConsoleApplication1\v15\ipch\d556a49adc05d55a.ipch
     目录           0  2018-04-16 00:30  动物园\ConsoleApplication1\
     文件        1471  2018-04-15 08:45  动物园\动物园.sln
     文件        1380  2018-04-16 00:25  动物园\ConsoleApplication1\ConsoleApplication1.cpp
     文件        8307  2018-04-15 11:21  动物园\ConsoleApplication1\ConsoleApplication1.vcxproj
     文件        1436  2018-04-15 11:21  动物园\ConsoleApplication1\ConsoleApplication1.vcxproj.filters
     文件         165  2018-04-15 08:45  动物园\ConsoleApplication1\ConsoleApplication1.vcxproj.user
     目录           0  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\
     目录           0  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleA.6DE1F598.tlog\
     文件        2634  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleA.6DE1F598.tlog\CL.command.1.tlog
     文件       23114  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleA.6DE1F598.tlog\CL.read.1.tlog
     文件        2360  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleA.6DE1F598.tlog\CL.write.1.tlog
     文件         210  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleA.6DE1F598.tlog\ConsoleApplication1.lastbuildstate
     文件        1604  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleA.6DE1F598.tlog\link.command.1.tlog
     文件        3572  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleA.6DE1F598.tlog\link.read.1.tlog
     文件         806  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleA.6DE1F598.tlog\link.write.1.tlog
     文件         113  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\ConsoleApplication1.log
     文件      102445  2018-04-16 00:26  动物园\ConsoleApplication1\Debug\ConsoleApplication1.obj
     文件     2883584  2018-04-15 23:32  动物园\ConsoleApplication1\Debug\ConsoleApplication1.pch
     文件        5613  2018-04-15 23:32  动物园\ConsoleApplication1\Debug\stdafx.obj
     文件      265216  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\vc141.idb
     文件      462848  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\vc141.pdb
     文件      281776  2018-04-16 00:29  动物园\ConsoleApplication1\Debug\zoo.obj
     文件         340  2018-04-15 08:45  动物园\ConsoleApplication1\stdafx.cpp
............此处省略8个文件信息

评论

共有 条评论