[Day 18] - memset, memcpy, strcpy, memmove

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

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

  • @stavb9400
    @stavb9400 2 года назад +2

    As much as I try to use C++ , the simplicity and straightforwardness of these commands makes me wonder why we need to keep adding to the complexity of C++. People can whine as much as they want about how unsafe C can be etc... the response should be use Java then

    • @MikeShah
      @MikeShah  2 года назад +4

      It's interesting when I am programming in C how I default to thinking in bytes and when I switch to C++ I'm in OO land. My experience is that at scale C++ offers nice things with OO programming and algorithms & containers -- that said Java or DLang offer those same benefits as well 🙂

    • @dogdog5994
      @dogdog5994 2 года назад +2

      What I like about plain C is the simplicity. A video about techniques for avoiding and tools for detecting buffer overflows and memory leaks in plain C would be a useful video.
      I have to limit what features and functions I use with C++, otherwise I'll have a hard to read mess. I seldom use Move Semantics for example because it adds too much complexity. I do use the containers, classes, operator overloading (sparingly and when useful), the string library, the math functions, etc. The algorithms can be tricky for me to understand. Perhaps you could make some more C++ videos about algorithms?
      There are some real deep and complicated aspects of C++ that apparently even professionals don't understand. I did read that some organizations limit the aspects of C++ that programmers are allowed to use to prevent the code from becoming an unreadable mess. A video with tips to prevent your C++ projects from becoming too complex and unreadable would be a good video idea?

    • @MikeShah
      @MikeShah  2 года назад +2

      @@dogdog5994 Will keep that in mind, taming complexity in codebases is a good topic!

    • @dogdog5994
      @dogdog5994 2 года назад +1

      It can be tradeoff between one problem vs another. Choosing to avoid Move Semantics (which can have performance benefits) to simplify the code (which can make code easier to understand and debug and even prevent some bugs altogether). It can be down to personal preference and what you're trying to accomplish.

    • @Ptr-NG
      @Ptr-NG 11 месяцев назад

      SAD that I couldnot like this comment enough!

  • @epic2717
    @epic2717 2 года назад +2

    You can use "man ascii" (at least I can with zsh on MacOS) to check the ASCII table without having to deal with those pesky ads!

    • @MikeShah
      @MikeShah  2 года назад

      Oh -- that is much better, cheers!

    • @haroldcruz8550
      @haroldcruz8550 7 месяцев назад

      Thanks, didn't know there is a manpage for ASCII

  • @Ptr-NG
    @Ptr-NG 11 месяцев назад +1

    Ciel! K&R doivent etre, au fond, des matheux!!

    • @MikeShah
      @MikeShah  11 месяцев назад

      C'est possible -- les mathematiques etais au prochain les computer science en universities. (Apologies for misspellings en Francais)