c++ split 日期
来源:互联网 发布:宁波cnc编程招聘信息 编辑:程序博客网 时间:2024/06/06 10:49
#include <iostream>
#include <vector>
#include <string>
#include <boost/algorithm/string.hpp>
using namespace std;
int main()
{
string str("2012-02-01 01:01:01");
cout<<str<<endl;
vector<string> tokens;
boost::split(tokens, str, boost::is_any_of("-: "));
for (size_t i = 0; i < tokens.size(); ++ i)
{
//cout << tokens[i] << endl;
printf("%d ", atoi(tokens[i].c_str()));
}
return 0;
}
#include <vector>
#include <string>
#include <boost/algorithm/string.hpp>
using namespace std;
int main()
{
string str("2012-02-01 01:01:01");
cout<<str<<endl;
vector<string> tokens;
boost::split(tokens, str, boost::is_any_of("-: "));
for (size_t i = 0; i < tokens.size(); ++ i)
{
//cout << tokens[i] << endl;
printf("%d ", atoi(tokens[i].c_str()));
}
return 0;
}
- split.c
- 【C++】Split
- c++ split 日期
- C#split的使用
- split string in C
- C split函数
- C#Split方法使用
- c#split用法
- split c 实现
- Problem C: Celebrity Split
- c标签split
- 日期比较(substring split prase)
- 分割字符串函数split(C#)
- Split的使用(C#)
- C/C++中的Split函数
- C/C++中的Split函数
- C/C++中的Split函数
- 分割字符串函数split(C#)
- 【转载】display:inline-block的深入理解
- 分治法求最大最小值
- USB HID报告及报告描述符简介
- varchar和Nvarchar区别
- netfilter按IP过滤报文
- c++ split 日期
- mpeg压缩输入格式---打包模式和平面模式
- java IO的一个问题
- JQuery常用知识
- 棋牌游戏跨平台已成趋势
- js验证表单大全
- 砝码称重(软件大赛)
- 非标准硬件控制之增加系统API
- 编程马拉松总结