hello, i’m new to programming in i’m trying to solve this exercise in C, basically it’s the amount of passed hours between the start of a game and it’s end, if the game started at 16 and ended at 2 the result is a game with 10 hours(in different days) i know i can to it more manually, but i wanted to somehow use the <time.h> to learn how to use a header etc, can someone help me?, thank you all

  • Anarch157a
    link
    52 years ago

    Take 10 minutes to watch this video, then follow his advice. get a library that handles time and date and use it.

    • @[email protected]OP
      link
      fedilink
      22 years ago

      tom scott descends into madness lmao, but was just for a simple exercise, i just wanted to complicate it to learn a little more :b

    • @[email protected]
      link
      fedilink
      22 years ago

      Leap days, leap seconds, time zones, daylight savings, and half a dozen other weird things make dining this way too hard. Use a library and hope the black magic keeps working

    • @[email protected]
      link
      fedilink
      22 years ago

      Without even clicking the link and only knowing the subject I strongly thought this link was going to be Tom Scott time rant.