Is there a way to convert a string val开发者_如何转开发ue into time_t format?
Thanks in advance.
One approach could be to parse the string into the various components and use them to fill a tm structure. Once you have the structure filled with data you can use the C function mktime to convert the structure into a time_t type.
There might be more ideal ways to do this in visual C++, but in normal C/C++ this is probably the way i'd do it untill I'd find a better algorithm.
精彩评论