inline void Stringsplit(const string& str, const string& split, vector<string>& res) //正则表达式来提取某一行的数据
{
//std::regex ws_re("\\s+"); // 正则表达式,匹配空格
std::regex reg(split); // 匹配split
std::sregex_token_iterator pos(str.begin(), str.end(), reg, -1);
decltype(pos) end; // 自动推导类型
for (; pos != end; ++pos)
{
res.push_back(pos->str());
}
}
while (if4.getline(buff,maxsize))
{
vector<string> line_string;
string split = " ";
Stringsplit(buff, split, line_string);
//对相邻六边形进行相关参数计算
for (auto it=line_string.begin()+1;it<line_string.end();it++)
{
of5 << *it << endl;
}
}