Not a kata suggestion~~
Nice observation skills and explanation. I Thank You for your time.
This comment is hidden because it contains spoiler information about the solution
If you look at line four of the 'for example' section in the description...
"A," = 0B10100000 = 160 (a + comma)
you'll notice that it is inconsistent. "(a + comma)" should be "(A + comma)". But anyway, fun kata! Thanks.
Creative Kata idea, but perhaps you could state explicitly in the description that for the punctuation (if not null), a whitespace always goes before the letter itself and all other punctuation (i.e. comma and period) come after the letter? I know there are code examples in the description that demonstrate this; however, since it was rather counter-intuitive to me that different punctuation were to be appended in a different order, I initially overlooked it and only found out after failing the example test and rereading the description after that, cheers :)
Input argument type is a mess: initial code has const unsigned char &n, description says std::vector, the actual tests expect std::vector<unsigned char> but the example tests accept things like std::vector<int> too.
const unsigned char &n
The starting code is odd, it's very C-like for a C++ kata. It doesn't work, either. And it's plain wrong - a parameter that should be some sort of range is instead a char reference!? Thankfully, that's no big deal...
Expected and the Actual values are same, still the test cases are failing. Is it a bug in the kata?
Good to know, thanks for checking!
I think That's a issue of CW's compiler, in my test function I never "new" any memory...
My first assumption is that someone wrote to unallocated memory. Or rather, to memory allocated not by them.
Any idea how that could happen?
Expected: equal to Hello, world.