Guest User

Untitled

a guest
Nov 23rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. struct tm {
  2. int tm_sec;
  3. int tm_min;
  4. int tm_hour;
  5. int tm_mday; ///< то что требуется
  6. int tm_mon;
  7. int tm_year;
  8. int tm_wday;
  9. int tm_yday;
  10. int tm_isdst;
  11. };
  12.  
  13. #include <windows.h>
  14. #include <iostream>
  15.  
  16. void main()
  17. {
  18. SYSTEMTIME st;
  19. GetSystemTime(&st);
  20. std::cout << st.wDay; // Вывод дня месяца
  21. }
  22.  
  23. #include <atltime.h>
  24.  
  25. int Month=CTime::GetMonth();
  26.  
  27. SYSTEMTIME st;
  28. GetSystemTime(&st);
  29. cout << to_string(st.wMinute) + "-"
  30. + to_string(st.wHour) + "."
  31. + to_string(st.wDay) + "."
  32. + to_string(st.wMonth) + "."
  33. + to_string(st.wYear) << endl;
Add Comment
Please, Sign In to add comment