Как я могу конвертировать авто в строку в C ++? - PullRequest
0 голосов
/ 12 октября 2019

Я пытаюсь получить минуты в строке для настройки в MessageBox, но я не могу преобразовать в строку, str содержит желаемую дату.

auto t = std::time(nullptr);
auto tm = *std::localtime(&t);

std::ostringstream oss;
oss << std::put_time(&tm, "%d-%m-%Y %H-%M-%S");
auto str = oss.str();
std::cout << str << std::endl; 
std::cout << md5(str) << std::endl;

//MessageBox::Show(str); the error this

logs:
none of the 21 overloads could convert all types of Cryptography argument c: \ users \ jesus \ source \ repos \ cryptography \ cryptography \ myform.h 137

...