Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment has been deleted.
it's incrementing a const'ed string pointer, not exactly "constant"
Hoooooo yes that's right, i understand now
Thank you !
in a way the integer works like a stack. incrementing it is like pushing, and decrementing is like popping
Switch statements or if/else clauses are not (imo) about number of options, nor is one simpler that the other. What I like about the
switch
statement is that it focuses on the char I'm discriminating for, not in the comparison.But of course that both approaches work, and you should go with the one that you feel most comfortable with. I do disagree, however, that one should choose between
switch
andif
based on number of branches.I disagree with "Best Practices" because using "switch" for just two options is too much, it is better with a simple "if else".
I also ran into problems when reversing the array in-place. That should be documented.