Is there a tool or specific syntax to insert cases into switches with consecutive indices and make the indices below adjust
I have a function that takes an integer and returns a string that is picked by a switch. The strings are part of a coherent text and I want to be able to add cases to the switch whenever I want to edit the coherent text that the function returns when called for each consecutive int.
Is there a way to use placeholders for switch cases that are translated to consecutive numbers during compilation in C++?
Is there any way to add case statements at any position inside a switch, in a way which makes the cases check for consecutive numbers for each case from top to bottom without specifying each index by hand? I especially need a way to INSERT more cases at any point during development into any place in the switch statement without changing ALL the case indices below.