c++ - trying to use std::get_time to parse YYMMDD and failing -
i'm trying , failing:
std::istringstream ss("1212"); ss >> std::get_time(&t, "%y%m"); if (ss.fail()) // every time!
this works ok:
std::istringstream ss("12-12"); ss >> std::get_time(&t, "%y-%m");
any ideas i'm doing wrong? can use otherwise windows doesnt appear have srtptime
windows/vs13 tia
visual studio not seem implement spec properly, nor did gcc until version 5.0. if continue use std::get_time
vs13 or vs15, need manually add delimiters able parse times until around realizing bug.
Comments
Post a Comment