I’m doing you a favor

  • socsa@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    Laughs in

    struct LooooongCounter {
        long highPart;
        long lowPart;
    };
    
    • TheyCallMeHacked
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago
      LooooongCounter operator++(const LooooongCounter& c) {
          if(c.lowPart == ULONG_MAX) {
              c.highPart++;
              c.lowPart = 0;
          }
          else c.lowPart++;
      }