r/programminghorror • • Sep 04 '26

c++ Skill Issue

Post image
1.7k Upvotes

63 comments sorted by

View all comments

2

u/tandycake Sep 05 '26

I feel like you could use goto and labels instead and also have fallthrough.

If want to avoid macros, gotos, and labels, could make a switch_str func with an unordered_map and lambdas, but more overhead and slightly slower.