随机生成数据并写入文档
随机生成数据并写入文档
此例随机生成对应的城市和一年12个月的天气状况并写入文档。
#include<iostream>
#include<vector>
#include<string>
#include<time.h>
#include<algorithm>
using namespace std;
//天气在枚举常量中表示
enum Enum_weather
{
Rainy=0,Snowy,Cloudy,Sunny
};
//创建城市类
原创
2020-12-29 13:00:58 ·
383 阅读 ·
0 评论