Browse
All 143, in reading order: The Hundred from beginner to advanced, then the two open collections.
143 entries
- 01Integer Division Truncatesthe average that loses its halfBeginner
- 020.1 + 0.2 Is Not 0.3two receipts, identical numbers on screen, different verdictsBeginner
- 03The Remainder That Went Negativethe wrap-around that forgot to wrapBeginner
- 04The Leading Zerothe padding that changes the numberBeginner
- 05The Shift That Wrapped Arounda trillion slots, give or take a trillionBeginner
- 06-1 Is Greater Than 1being one item ahead of schedule has never looked so badBeginner
- 07The Loop That Never Endsa four-step countdown with remarkable staminaBeginner
- 083 > 2 > 1 Is Falseperfectly good math, just not in this languageBeginner
- 09The Bit Test That Never Firesa parity check that has already made up its mindBeginner
- 10char + int = intone small step for a letterBeginner
- 11The Integer That Prints a Letter
int8_tis not what it says on the tinBeginner - 12The Pointer That Printed Its Contentsthe same pointer, printed twice, two different answersBeginner
- 13Two Identical Strings That Are Not Equalthe same seven characters, and
==still disagreesBeginner - 14Adding to a String Literalthe
+that takes awayBeginner - 15The String That Stops Earlyfive characters go in; how many come out?Beginner
- 16The Vanishing Array Elementa shopping list that comes up shortBeginner
- 17The Array That Filled Itself With Zerosthe same idiom twice; only one of them keeps its promiseBeginner
- 18The Variable That Is Zero on Tuesdaysone function, called twice, disagreeing with itselfBeginner
- 19The Initializer That Says Notwo values shrink, and nothing stops themBeginner
- 20The Most Vexing Parsethe object that never existedBeginner
- 21One Scope for Every Caseone tidy local, and the case *below* it stops compilingBeginner
- 22The Macro That Did the Wrong Matha 4×4 square with a suspicious areaBeginner
- 23The Sum That Rounds Every Stepfour quarters that don't make a wholeBeginner
- 24The Read That Writesasking the question changes the answerBeginner
- 25The Search That Always Succeedsthe spam filter with a 100% detection rateBeginner
- 26The Container of Liesthe copy that kept in touchBeginner
- 27The Last Line, Twicethree readings go in, four come outBeginner
- 28The Name That Came Back Emptythe prompt nobody got to answerBeginner
- 29The Format That Would Not Leaveone value asked for hex; two of them got itBeginner
- 30auto Never Deduces a Referencethe update that goes nowhereIntermediate
- 31Two Consts, Two Meaningssame keyword, two different locksIntermediate
- 32The const Object That Changeda
constobject, aconstmethod, and something still movesIntermediate - 33The Struct That Forgot Its Zerotwo points, two braces apartIntermediate
- 34The Struct That Shranksame three members, different order, different billIntermediate
- 35The Array That Became a Pointersame array, same operator, two different answersIntermediate
- 36The delete That Freed One Objectthree objects in, one funeralIntermediate
- 37Braces Change the Constructorthe harmless-looking swap from
(to{Intermediate - 38reserve Is Not resizethe score you wrote down, and then couldn't findIntermediate
- 39push_back During the Loopthe to-do list that ate itselfIntermediate
- 40The Erase That Skipsa loop that deletes every 2, more or lessIntermediate
- 41std::remove Removes Nothingthe removal that never happensIntermediate
- 42The Map You Cannot Reada lookup so innocent it doesn't even compileIntermediate
- 43The Insert That Did Nothingno error, no warning, and no changeIntermediate
- 44The Element You Cannot Toucha mutable set, an iterator in hand, and still no way inIntermediate
- 45The Loop That Copied the Whole Mapthe
&that doesn't save you a thingIntermediate - 46The Two Keys That Became Onetwo spellings go in, one comes outIntermediate
- 47The Search Miss That Threwthe missing colon it shrugs off, then dies onIntermediate
- 48The optional That Is Always Truethe setting the user switched off, and the program never got the memoIntermediate
- 49The Character That Went Negativea pixel so bright it came out the other sideIntermediate
- 50The Dog That Lost Its Woofthe shelter that takes in dogs and hands back something quieterIntermediate
- 51The Virtual Call That Isn'tpolymorphism keeps office hoursIntermediate
- 52Derived Body, Base Defaultthe override you wrote, with an argument you didn'tIntermediate
- 53The Override That Was Notone keyword short of polymorphismIntermediate
- 54One Overload Hides Them Alladd one overload, lose the restIntermediate
- 55The Constructor That Was a Conversiona constructor with an open-door policyIntermediate
- 56The Initializer List That Liedpriced before it was countedIntermediate
- 57The Destructor That Never Ranthe socket closes; the key does notIntermediate
- 58The Copy That Freed Your Memory Twiceone
new[], one owner, and somehow two funeralsIntermediate - 59The Destructor That Deleted Your Movetwo structs, one extra line, and only one of them movesIntermediate
- 60std::move Moves Nothingthe move that never happenedIntermediate
- 61return std::move(x) Is Slowera helping hand the optimizer never asked forIntermediate
- 62Two Owners, One Corpsetwo owners who never metIntermediate
- 63The Reference Count That Never Reached Zerotwo objects, each politely waiting for the other to leave firstIntermediate
- 64The C String From a Dead Stringthe greeting that only works for people with short namesIntermediate
- 65The View of a Dead Stringthe quote that quietly quotes someone elseIntermediate
- 66The Lambda That Outlived Its Capturethe counter that lost countIntermediate
- 67The Thread You Forgot to Jointhe abort that nothing threwIntermediate
- 68The Guard That Guards Nothingthe shortest critical section in C++Intermediate
- 69The Newline That Cost a Syscalltwo loops, the same 200 000 lines, one manipulator apartIntermediate
- 70Argument Rouletteyour arguments, the compiler's orderAdvanced
- 71&& Without the Shortcuttwo ampersands, zero protectionAdvanced
- 72The String That Became trueone overload too many, and your error message vanishesAdvanced
- 73The Overload That Swallowed Everythingyou wrote a
std::stringoverload; astd::stringwalks straight past itAdvanced - 74One Brace, Two Meaningssame braces, same 42, one stray
=Advanced - 75The Parentheses That Changed the Typea getter with no
&in sightAdvanced - 76Looping Over a Corpsetwo loops, one pair of parentheses apartAdvanced
- 77The Maximum That Vanishedsaving the winner is what loses itAdvanced
- 78[=] Captures this, Not Membersa copy capture that copies less than you thinkAdvanced
- 79The Object That Was Never Destroyedcleanup that only half happensAdvanced
- 80The Destructor That Ends It Allan exception with nowhere to goAdvanced
- 81The Exception That Lost Its Messagethe same disaster, reported twiceAdvanced
- 82The Move That Copiesyour move constructor is present, correct, and ignoredAdvanced
- 83The Comparator That Corruptsthe ties that unbindAdvanced
- 84The Function You Never Importedyou have been relying on this since your first *hello world*Advanced
- 85The Member That Wasn't Therethe base class declares it, plain as dayAdvanced
- 86The Type the Compiler Refused to Believespelled right, scoped right, and still not a typeAdvanced
- 87The Specialization Nobody Calledyou hand-wrote the
int*case; now watch who answersAdvanced - 88One Object, Two Addressesthe button that is in two places at onceAdvanced
- 89The Base Class You Have Twicetwo writes to one
int, and both surviveAdvanced - 90The Initialization Order Fiascotwo
.cppfiles walk into a linker…Advanced - 91The Singleton That Died Firstthe singleton is lazy, thread-safe, and already goneAdvanced
- 92The Global That Was Not Globalfive calls, and nobody counted to fiveAdvanced
- 93The Overflow That Never Happensone program, one input, two answersAdvanced
- 94The Division That Crashedno zeros were harmed in this divide-by-zeroAdvanced
- 95The Function With No Returnthe code that worked fine until someone turned the optimizer onAdvanced
- 96The bool That Was Botha flag that answers yes to every questionAdvanced
- 97The Write the Compiler Ignoredone slot, two names, two answersAdvanced
- 98The Flag the Thread Never Sawtested at
-O0, shipped at-O2Advanced - 99The async That Never Startedthe worker that clocks in only when you lookAdvanced
- 100The async That Runs in Seriesfire and forget, minus the forgetAdvanced
- —The Assertion That Did Workthe counter that vanishes in a release buildIntermediate
- —The Callback That Updated a Copytwo increments, and the counter never movesIntermediate
- —The Bitset String That Runs Backwardthe leftmost
1lands in the highest bitIntermediate - —The Negative Duration That Lost a Seconda 1.5-second offset that becomes negative oneIntermediate
- —The Path That Ignored Its Directorya POSIX-absolute filename that silently overrides the baseIntermediate
- —The Counter That Split in Twocopying the callback quietly forks its historyIntermediate
- —The Future You Can Get Only Oncereading the answer consumes the handleIntermediate
- —The Macro String That Did Not Expandone helper layer changes the text entirelyIntermediate
- —The Value Built for a Failed Insertthe map keeps its old value after loading a new oneIntermediate
- —The Rvalue Reference That Is an Lvaluethe parameter type is not the expression categoryIntermediate
- —The Null That Picked a Portasking for no host, and connecting to port zeroBeginner
- —The Search That Accepted a Suffixa validator that finds a number inside anythingIntermediate
- —The
shared_from_thisWith No Ownerenabling the feature does not establish ownershipAdvanced - —The Increment
sizeofNever Performedthe counter is mentioned, but never changesIntermediate - —The Number With Unitsa numeric parse that quietly accepts
msBeginner - —The Number Strings That Sorted Like Wordsthe values look numeric, but their type is textBeginner
- —The View That Printed Past Its Endfive visible characters, eleven printed onesIntermediate
- —The
typeidThat Saw Only the Basea base reference reveals less than the object holdsAdvanced - —The Unique Values That Stayed Duplicatedthree sevens, and
uniquekeeps every oneIntermediate - —The Default That Was Loaded Anywaythe optional with a value that still calls the fallbackIntermediate
- —The
variantAccess That Threwthe type is allowed, but it is not active nowIntermediate - —The Braces That Are Not Bracesvalid C++17, with no brace and no
&&in sightTrivia - —The Empty
anyWhose Type Isvoidan empty box that still answers a type queryTrivia - —The Character With Size Onea quoted character that is not an
intin C++Trivia - —The Comma That Picks the Subscripttwo expressions between brackets, but only one indexTrivia
- —The Apostrophes That Are Part of a Numbergrouped digits, with no string and no commentTrivia
- —The Constructor That Catches and Still Failsthe handler runs, yet no
Meterobject reaches the callerTrivia - —The Object That Cannot Be Moveddeleted copy and move constructors, yet a returned objectTrivia
- —The Floating Literal With a
pa hexadecimal-looking number that is already adoubleTrivia - —The Branch That Does Not Existan impossible member access, and a well-formed callTrivia
- —The Type You Can Calla type trait that behaves like a nullary functionTrivia
- —A Base Class That Cannot Be Convertedtwo type traits ask different questions about private inheritanceTrivia
- —The Lambda That Becomes a Function Pointera local callable accepted where an ordinary callback is requiredTrivia
- —
autoCan Be a Value Template Parameterthe template argument supplies both a value and its typeTrivia - —The Null With a Typea null pointer literal that is neither an integer nor a pointerTrivia
- —The Arrow That Is Not a Pointeran object uses
->twice before an actual pointer appearsTrivia - —The Fraction Type That Reduces Itselfa fraction normalized before any object existsTrivia
- —The Backslash That Stayed a Backslashan escape sequence that arrives as two ordinary charactersTrivia
- —The Subscript That Runs Backwardsthe index and the array, on the wrong sides of the bracketsTrivia
- —The Static That Splits by Typeone local static, two countersTrivia
- —The UTF-8 Literal That Is
charC++17's UTF-8 prefix does not yet create a new character typeTrivia - —Two Identical Lambdas With Different Typesthe same-looking expression creates two closure typesTrivia
- —The Variant With Two Intstwo indistinguishable alternatives, yet a legal variantTrivia
No entries match those filters.