Summary
Full Transcript
►Full C++ Series Playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd8j-tlhYVPYgiIyXduu6m-L ►Find full courses on: https://courses.mshah.io/ ►Join as Member to Support the channel: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join ►Lesson Description: In this lesson I talk about one of the things we often have to keep in mind when comparing data types, signed versus unsigned comparison. The actual bit representation of an unsigned number is often using a twos complement representation, thus the values may appear 'bigger' at the bit level than what we would expect as programmers. In order to fix this, we can use -Wall to warn us of such conversions, or otherwise use a C++ 20 feature like std::cmp_greater in the utility header (and associated comparisons) to write more stable code. ►YouTube Channel: https://www.youtube.com/c/MikeShah ►Please like and subscribe to help the channel!
