Quick introduction to macros

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • Some explanations make macros and the preprocessor phase seem very complicated when, in fact, it's a simple process of copy and paste. Feel free to ask questions in the comments below!
    ---
    IDE used in the video: sourceforge.ne...
    Check out my course over on Udemy: www.udemy.com/...

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

  • @michalbotor
    @michalbotor 2 года назад +12

    fantastic explanation of why we need to use #define PRODUCT(X, Y) (X) * (Y) instead of #define PRODUCT(X, Y) X * Y
    your videos are so easy to understand!
    you make me start loving c!

  • @yessirski7868
    @yessirski7868 6 месяцев назад +1

    6 years later and they is coming in clutch for my midterm I have coming up in the morning! Thank you! 6 years later and still informative and relevant.

  • @shahqu5dohcoh9ri88
    @shahqu5dohcoh9ri88 3 года назад +20

    Why does this video have so few visuals??? It's fantastic, as all your videos

  • @avixx
    @avixx 4 месяца назад

    Thanks for all C vids, you helped me a lot!

  • @raidtheferry
    @raidtheferry 7 месяцев назад +6

    seems so simple but this type of video is what the YT programming-tutorial community is missing. Quick, succinct, factual, and to the point. Thanks. Your vids on C fundamentals are a huge help

  • @MenakuanzambiFernando
    @MenakuanzambiFernando 4 месяца назад

    Really great video, very thanks for the content

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

    Thanks for the videos. You do a great job explaining and teaching

  • @berkcan2439
    @berkcan2439 4 года назад +23

    Have you realize that the videos that have low views are real informative videos especially programming language videos. Thanks you so much it is gonna be useful assert function parameters i guess.

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

    what a gift

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

    I don't know if is a good practice to use the pre-processor for something like the calculation of a given function, but it has sense to replace the constanst in order not to use space of memory to storage constansts.

  • @fluffyweird
    @fluffyweird Год назад +1

    This is really good bruh you made it more clear than the man page thank you so much :)

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

    top-tier vids! Thank you so much, man!

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

    I abuse the hell out of the "define" directive - sometimes I replace an entire body of statements with a single word that summarises its purpose. I realise that this is often considered poor programming practice, but it often feels very convenient - especially things like replacing the awkward line
    "( ('a'

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

      I would use a function for that maybe. But, definitely if you want the most performance (and some good readability), this is the way to go

  • @AliG.G
    @AliG.G 4 года назад +2

    I reckon I have struck gold

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

    your videos are really fantastic!!! keep it up

  • @johncody4271
    @johncody4271 8 месяцев назад +1

    Fantastic vid! This was a perfect reminder of what macros are & what they can do & a common pitfall!

  • @samaellovecraft
    @samaellovecraft 5 месяцев назад

    Thanks for the knowledge!

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

    thanks very good explanation

  • @mansbjork5721
    @mansbjork5721 Год назад +1

    I'm working with C for a course at my university and this is quite helpful.

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

    Fascinating! Really good introduction. Thank you!

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

    Please why do you like using main with arguments instead of void?

    • @CodeVault
      @CodeVault  5 месяцев назад

      That's just how the standard defines it

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

    thanks a ton!

  • @abdoroma6928
    @abdoroma6928 Год назад

    Very cool

  • @furkankamaci6180
    @furkankamaci6180 Год назад

    amazing..

  • @amanvarshney51217
    @amanvarshney51217 Год назад

    Tysm I always recommend your channel to my friends for C programming and OS related concepts.

  • @CosmJJ
    @CosmJJ 4 года назад +1

    Great channel! Thank you very much!

  • @АрманСоколовский
    @АрманСоколовский 4 года назад +1

    This video have to be popular

  • @tomsterbg8130
    @tomsterbg8130 Год назад

    No wonder that our C++ teacher told us "when in doubt, add more parentheses"

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

    احبك كثيرا لانك تلهمني لأكون مبرمجة💜💜💜💜

  • @DevDoge_
    @DevDoge_ Год назад

    Thank you so much, very well done introduction to macros!

  • @einfacheente
    @einfacheente Год назад

    Great video easy to understand 👍

  • @htainlindwa7603
    @htainlindwa7603 Год назад

    Nice explainationThamx

  • @minercreepmc
    @minercreepmc 3 года назад

    Still best channel teach C with friendly way

  • @gabrielzaharia99
    @gabrielzaharia99 3 года назад

    Thank you so much for the tutorials!

  • @amnakhalil
    @amnakhalil Год назад

    Oh my gaawd.. u r great

  • @fernandodejesuslucart9339
    @fernandodejesuslucart9339 Год назад

    incredible explanation

  • @someone-ci6cl
    @someone-ci6cl 2 года назад

    ummmmmm sorry but r u a german ?

  • @LL-ue3ek
    @LL-ue3ek Год назад

    Thank you for the demo! I never used it this way: #define PRODUCT(X,Y) X*Y interesting!