看了boost库的正则表达式后写的。。。
代码:
#include <string>
#include <boost/regex.hpp>
#include <iostream>
#include <fstream>
#include <windows.h>
class weather
{
public:
weather(std::string sprovince="guangdong",std::string sposition="guangzhou"):_province(sprovince),_position(sposition) {}
void flash();
void clear() { _date.clear();_weather.clear();_tem.clear();_wind.clear();}
std::string get_day(int day);
const std::string& get_date(int day=0) {return _date[day];}
const std::string& get_weather(int day=0) {return _weather[day];}
const std::string& get_temperature(int day=0) {return _tem[day];}
const std::string& get_wind(int day=0) {return _wind[day];}
friend std::ostream& operator<<(std::ostream& out,weather& wea);
void cha