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.
The kata is great imo, but is seems pretty similar to this one (please correct me if i'm wrong!).
I'm a little confused as to the description of the
+
's character function. Does flipping the bit under the pointer refer to the bit in the input itself? I guess my confusion comes from the fact that the usage of,
is described as such : "Reads a bit from the input stream, storing it under the pointer.", wherestoring
would imply the value is isolated from the input. Please correct me if my understanding is wrong.Indeed, my code was buggy (didn't think of different function calls) : sorry for marking as an issue, and thanks for the help!
This comment is hidden because it contains spoiler information about the solution
I wrote my code in VStudio and copy/pasted it in the kata once I thought it worked correctly. When the random tests came up, the output of my code was apparently wrong. So I outputted the initial strings (numbers) used in these random tests (using
cout
), and tried them in VStudio. The outputted number was not the same on my local machine : it was what was supposed to be correct. Could the problem be in the compiler? I don't use any standard lib functions, onlychar
casting and severalfor
loops... (I can upload the code if necesseray)Retried it several times and it ended up working...
My code (C++) passes the sample tests, yet, when I attempt the whole kata, it says the BasicTests are passed, but exits with code 132 (without even attempting any random test or something else).
SampleTests : Time: 1849ms Passed: 1 Failed: 0
Test Results: ExampleTests (green arrow); BasicTests (green arrow);
Kata Attempt: Time: 2146ms Passed: 1 Failed: 0 Exit Code: 132
Test Results: ExampleTests (RED arrow); BasicTests (green arrow);