I'm trying to do this and 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 what i'm doing wrong? what can i use otherwise as windows doesnt appear to have a srtptime
windows/vs13 TIA
Visual Studio does not seem to implement the spec properly, nor did GCC until version 5.0. If you continue to use std::get_time
with VS13 or even VS15, you will need to manually add delimiters to be able to parse times until they finally get around to realizing this bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With