c++ error: Function 'get_time' could not be resolved - Ubuntu g++

I have the following piece of C++ code on my class, to convert a ISO 8601 string to a time_t structure:

#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...

But the compiler insists on giving me the following error:

Function 'get_time' could not be resolved

According to here, std::get_time should be included with iomanip

I supposed all I had to do was to include iomanip... Am I missing something here ?

I´m running Ubuntu 14.04 LTS.

Thanks for helping.

Answers


At the bottom of this bug report Jonathan Wakely reports it's available from GCC 5. You can use g++ --version to check your version. (Should be std::tm tenpTime FWIW).


The developer himself says here it's not implemented yet, but seems to be implemented in GCC 5 now so you need to find an upgrade.


Need Your Help

Huge memory leak in opencv

c++ qt opencv memory-leaks ubuntu-12.04

I've written a very very simple C++ program to read 600 video frames in a multi-threaded code. the problem is that when I release each of these frames the free memory size doesn't change!

How to add lock symbol to my website using private SSL in https pages in PHP

php ssl https ssl-certificate

I just purchased SSL for my website from hostgator, so that I can add lock symbol in my website, when users visit https://www.mysite.com

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.