What exactly is NULL?

Keep exploring at brilliant.org/TheCherno/ Get started for free, and hurry-the first 200 people get 20% off an annual premium subscription.
Patreon ► / thecherno
Instagram ► / thecherno
Twitter ► / thecherno
Discord ► / discord
This video is sponsored by Brilliant.

Пікірлер: 612

  • @TheCherno
    @TheCherno Жыл бұрын

    Hope you guys enjoyed the video - if you want more C++ videos let me know! Keep exploring at

  • @BM-jy6cb
    @BM-jy6cb Жыл бұрын

    I'm an old-time hardware/assembly programmer who progressed to C in the late 80's, which I found natural. In the mid 90's, I made a move to C++ and somehow just lost confidence in my ability to understand what was actually going on under the hood. As more and more features were added, I avoided them as "black magic". Your series has rekindled my confidence that it's still just bits and bytes. Thank you!

  • @0xDeadC0de1
    @0xDeadC0de1 Жыл бұрын

    there was a day where compilers didn't care if you used an uninitialized pointer and would just do undefined behavior, made some things really difficult.

  • @metubr
    @metubr Жыл бұрын

    I miss the c++ series so much every one is a banger

  • @olo90
    @olo90 Жыл бұрын

    12:33

  • @uMadBrudi
    @uMadBrudi Жыл бұрын

    C++ isn't even my main language, but holy moly you learn so much from these deep dive videos it's insane.

  • @jbird4478
    @jbird4478 Жыл бұрын

    I like how you explain the mechanism instead of just saying "do this and this", what many people on youtube do. Nothing new for me, but people can actually learn from this kind of content, so props to you.

  • @giantsue
    @giantsue Жыл бұрын

    Dude seriously after 10 years of working in C++ you keep giving me so much input about stuff I didn't know before. keep going.

  • @ycombinator765
    @ycombinator765 Жыл бұрын

    I swear to GOD that I was havning a conversation about NULL at exercism with a mentor, and came here to YT after having finished asking my question, and here the Cherno is, having upped a video about NULLs and yt recommending it after 3 mins of upload. I feel connected lol

  • @mladen777
    @mladen777 Жыл бұрын

    Thanks Cherno for these videos, you’re such an amazing teacher! I hope your C++ series will cover all stuff that is used in C++ programing at some point(if thats eaven possible). It’s already one of the best places for someone to learn C++ (apart from a person coding themselves) and I think it would be amazing for someone to be able to just open your playlist and find anything they need C++ oriented.

  • @alecmather
    @alecmather Жыл бұрын

    Dude I literally love your videos. Even just you showing how you can inspect the physical memory like that?? Never knew that and that's sooo cool.

  • @mananasi_ananas
    @mananasi_ananas Жыл бұрын

    Might be interesting to mention that C++ does not care whether or not you want to access a nullptr. It compiles fine. There is a memory management unit (MMU) in your PC that the OS will configure, usually making the first page of memory inaccessible. This is what makes reading from null an access violation.

  • @yobonez
    @yobonez Жыл бұрын

    This explaination was soo clear, thank you!

  • @Albert-lr7ky
    @Albert-lr7ky Жыл бұрын

    Great work Cherno! C++videos is a masterpiece, hope you can keep producing it !!!

  • @benjaminclehmann
    @benjaminclehmann Жыл бұрын

    If you want to hear something cursed, C (not sure about C++) compilers are required to give null pointers the value of 0, but their memory representation (like many representations within C) is undefined. This means that setting pointers to 0 and comparing pointers to 0 will work as expected, but only if you do so through a correct type (i.e. T*).

  • @billywap
    @billywap Жыл бұрын

    Always love these videos!!! Thanks for making another one

  • @avivpk
    @avivpk

    Still the best C++ series out there! Could you please make a video about files in C++ ?

  • @ivansirtautas2513
    @ivansirtautas2513 Жыл бұрын

    I usually get kind of lost in your videos 'cause they a bit advanced for me. But this one was at an epiphany level. So clear and reachable. Thank you

  • @kin-dza-dza3929
    @kin-dza-dza3929 Жыл бұрын

    Your videos are so helpful. Thank you man.

  • @andrasvermes
    @andrasvermes Жыл бұрын

    I was just looking into defining extension methods in C# and found the syntax a bit unusual. Now I totally understand why they are written the way they are. It's kinda like what you explained but in reverse. Really interesting! Thanks :))