I have a code that works fine on windows, and I have to make it compatible with Linux. Can anyone help me configure the following code snippet to windows?
MongoDB* db = MongoDB::getInstance();
mongocxx::pipeline p{};
struct tm tm;
strptime(fromdate.c_str(), "%Y-%m-%d %H %M %S", &tm); //this line gives me some errors
std::time_t tt = std::mktime(&tm);
The error that I'm getting `error C3861: 'strptime': identifier not found
I tried to use the code in http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/time/strptime.c?rev=HEAD
but it also gives some error because it says some header files such as #include <sys/cdefs.h>
, #include "namespace.h"
are missing
can anyone tell me how to include those header files in the project or any other way of fixing this issue Thank you in advance