Nicolai Josuttis - C++17 - the biggest traps

Поделиться
HTML-код
  • Опубликовано: 31 дек 2024

Комментарии • 2

  • @EgorChebotarev
    @EgorChebotarev 2 месяца назад

    nice

  • @CTPATEX
    @CTPATEX 5 лет назад +2

    10:48 What is wrong with this program? 1) You can't use argv[n] as a path - this is not portable and will never work on Windows; 2) You can't portably print path or argv[n] to std::cout; 3) Your program prints nothing - you didn't flush (although ... could, theoritically); 4) Your program will crash if, for example, there is no permission to traverse the directory; 5) Having your includes not sorted is gross; 6) Two TOCTOU bugs.