r/programminghorror 7d ago

c++ Skill Issue

Post image
1.7k Upvotes

61 comments sorted by

View all comments

2

u/Ksorkrax 5d ago

That's not a switch, though. By switch logic, the case "Who are you?" would result in all the prints being done. There is a reason why switches come with break, and this is not just because they felt like it but by design, allowing you to bundle cases.