#include <iostream>
#include <string>
#include <sstream>
#include <chrono>
#include <ctime>
#include <ratio>
#include <iomanip>
using namespace std;
int main()
{
using hrc = chrono::high_resolution_clock;
hrc::time_point tp = hrc::now();
chrono::milliseconds ms = chrono::duration_cast<chrono::milliseconds>(tp.time_since_epoch());
chrono::seconds s = chrono::duration_cast<chrono::seconds>(ms);
std::time_t time = s.count();
ostringstream oss;
oss << put_time(localtime(&time), "%Y.%m.%d %H:%M:%S");
cout << oss.str() << '\n';
cout << put_time(localtime(&time), "%Y.%m.%d %H:%M:%S") << '\n';
cout << ctime(&time) << '\n';
return 0;
}
Wklejam kod z komórki na stronę, uruchamiam i mam błąd z tematu.