Classes can be intimidating for beginners. We recommend mastering the core and basic concepts of C++ first and then learning more about classes.
Ready to start your C++ career?
You’ve just seen the basics—but there’s so much more to explore:
If you’re serious about becoming a professional C++ developer, join our “Become a C++ Developer Career Path”—master the language, build real projects, and kickstart your career.
Debugging challenge#
You’ve come a long way in this tutorial—from printing messages and declaring variables to using arrays and functions. Great job!
Now, let’s apply all that knowledge to a small challenge. We have written a code for Gardona to display the garden reports.
But… uh-oh!
There are a few bugs in the code—some mistakes causing it to throw errors or not behave as expected.
Spot and fix the issues!#
Read through the code below. Can you identify what’s wrong, fix it, and run it with the correct output?
Don’t rush to the solution! Try your best first.
If you’re stuck, check the “Debugging Hints.” Only look at the solution if you still can’t solve it.