我的课程上有以下C ++代码段,用于将ISO 8601字符串转换为time_t
结构:
#include <iostream>
#include <sstream>
#include <string>
#include <iomanip>
#include <ctime>
.... class code...
struct tm tempTime;
std::stringstream ss(data);
ss >> std::get_time(&tempTime, "%FT%TZ");
std::time_t time = mktime(&tempTime);
.... class code...
但是编译器坚持给我以下错误:
Function 'get_time' could not be resolved
根据此处,std::get_time
应包含在iomanip
我以为我要做的就是包括iomanip
...我在这里错过了什么吗?
我正在运行Ubuntu 14.04 LTS。
感谢您的帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句