Tech Note 031 - C Pointers & and *, What are they and Why?

Поділитися
Вставка
  • Опубліковано 28 січ 2025

КОМЕНТАРІ • 10

  • @gibo588
    @gibo588 5 років тому

    Maaan nobody has done this. Thanks so much. Actually programming is all about data structures. You know this. You know programming. That is all there is to it!

  • @andrzejdamianpierzasty8916
    @andrzejdamianpierzasty8916 7 років тому +1

    Bardzo dobre wykłady, oby takich było więcej.

    • @G6EJD
      @G6EJD  7 років тому

      Dziękuję, tak ja bardziej planowy (Google translated)

  • @asiw
    @asiw 7 років тому

    Thanks for explaining that so clearly. I have never been able to get to grips with & and * but I now have some idea what they mean and why they are used. Still think I'll try to avoid them where possible. Best wishes, Arthur

  • @DevelopWithDan
    @DevelopWithDan 7 років тому

    Thanks so much for this. Great explanation. I appreciate your channel. Just subscribed.

  • @crckdns
    @crckdns 6 років тому

    Actually you can pass the pointer to an array.. but then you have to access the data by direct addresses in the array slots 😸
    Great video though, remembers me on good old times in university, but you are explaining better 😹👍

    • @G6EJD
      @G6EJD  6 років тому +1

      Thanks, there’s a quirk with Arduino array parsing as there is no difference between passing by value or reference. It says that in the reference guide.

  • @axa.axa.
    @axa.axa. 5 років тому +2

    Man I hate pointers and am bad with them. Shocking how successful I've been in programming despite of this.

    • @G6EJD
      @G6EJD  5 років тому

      I’m the same, your not alone and yes love them or hate them 😊 it would help too if the Arduino compiler managed pointers as defined for example sometimes you expect to parse variables by reference when actually it parses by value, a good example is parsing an array by reference to a function thinking it’s not going to consume memory when in fact it parses by value, so a 50K array gets doubled in RAM while the function uses it then the compiler writes back to the original if parsed by reference if parsed by value it just erases it, thereby defeating the programming option/requirement and compromising reliability and creating all sorts of problems.

    • @axa.axa.
      @axa.axa. 5 років тому

      @@G6EJD 😳 long live c# !