General C++ Programming - April 2023 (Page 2)

where can I find time_of_day<T>?
 
I ran across this code: std::tm to_tm(zoned_seconds tp) { using namespace std; using namespace std::chrono; auto lt ...
[1 reply] : I believe time_of_day was renamed hh_mm_ss . https://en.cppreferen... (by Peter87)
return now() as sys_seconds
 
I need the following function std::chrono::sys_seconds now() { const auto now_point = std::chrono::system_clock::now(); return now_point; ...
[3 replies] Last: Excellent solutions!! Thanks ! (by JUANDENT)
sys_days + months{2} how to pass it with a unit of seconds?
 
Look at this code: chr::sys_days sdays = 2024y / 2 / 29; auto sdays_ = sdays + chr::months{ 2 }; // unit 54 seconds auto interval = sdays_.tim...
[1 reply] : What exactly is not working? This sample works as expected: namesp... (by malibor)
by Cplusc
reading binary file
 
I am trying to read an stl binary file using following code but just a few numbers of data are read correctly, the rest are either very large or small. the data...
[4 replies] Last: That's right. Thank you (by Cplusc)
How to find the difference between time_point<utc_clock> and time_point<system_clock>?
 
I have the following code: auto utc_now = chr::utc_clock::now(); auto now = chr::system_clock::now(); auto dif = now - utcNow; // does not compile ...
[1 reply] : https://stackoverflow.com/questions/35282308/convert-between-c11-clock... (by deleted account xyzzy)
April 2023 Pages: 12
  Archived months: [mar2023] [may2023]

This is an archived page. To post a new message, go to the current page.