问题描述
我需要获取当前的DateTime
将其转换为std :: string(因为它将被传递给需要std :: string的加密函数)
然后我将加密的字符串存储在一个文件中。
以后我会读取字符串,解码它
我想将它改回DataTime
然后,我想找到刚刚检索到的DateTime之间的分钟数当前的约会时间。
我已经玩了好几年了,尝试从t'interwebs收集的各种东西,但找不到任何有意义的东西对我来说 - 很多东西'前C ++ 11'或C语言而不是C ++
我会感激一些帮助!
I need to get the current DateTime
Convert it to a std::string (because it is going to be passed to an encryption function that requires a std::string)
I am then going to store the encrypted string in a file.
later I will read the string, decode it
And I want to change it back into a DataTime
Then, I want to find the number of minutes between the DateTime just retrieved and the current date time.
I've been flonking around for ages, trying all sorts of stuff gleaned from t'interwebs, but can't find anything that makes sense to me - and lots of stuff 'pre-C++11' or for C rather than for C++
I'd appreciate some help!
推荐答案
这篇关于转换为/从DateTime和C ++ 11中的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!