C++ – Convert a string to a date in C++


I know this may be simple but being C++ I doubt it will be. How do I convert a string in the form 01/01/2008 to a date so I can manipulate it? I am happy to break the string into the day month year constituents. Also happy if solution is Windows only.

Best Solution

#include <time.h>
char *strptime(const char *buf, const char *format, struct tm *tm);