© Will Briggs 2021
W. BriggsC++20 for Lazy Programmershttps://doi.org/10.1007/978-1-4842-6306-8_9

9. Using the Debugger

Will Briggs1  
(1)
Lynchburg, VA, USA
 

The debugger lets you step through the program, line by line or function by function, seeing the values of variables so you can tell what’s wrong. Good idea, right?

I think so. To cover useful debugger commands, let’s use the debugger to repair the flawed program in Example 9-1. It’s intended to draw a US flag: a sort of a groovy handmade-looking version with hollow stars as shown ../images/477913_2_En_9_Chapter/477913_2_En_9_Figa_HTML.jpg. (To do a better job, we’d use an image from a file – but for now I want to debug a star-writing function.) The design ...

Get C++20 for Lazy Programmers: Quick, Easy, and Fun C++ for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.