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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -