You have put i++ in various places with unintended effects. I suggest you to learn debugging by inserting code to print to error stream, so you can see the values of the variables at various points of the code like this:
You’ll find that when you have finished the second if-block, i = 5. Then execution goes back to the last statement of the outer for-loop, which is i++, so i becomes 6 (which is the ending “1” position). Then the for-loop starts again, execution goes to the first if-block, and it just sees 1 “1” instead of 2 "1"s.
Do you mean you fail on submission? If so, you may check which validator(s) you are failing by clicking RESULTS on the left, and then MY REPORT and DETAILS.
I have re-checked your code. The index you need to check is 6 instead of 5, and you need an additional pair of brackets in that line so that the condition is interpreted correctly.
This were the bugs I mentioned
But for all poeople who have problems with this challenge I really recommend writing a decoder so you can see what is blown up
Hello All, I am using C++ and I got my code to work and looking at the pros results. They have this line
((MESSAGE[0] & (1 << 6)) >> 6). I don’t understand what the << and >> means in this expression. Anyone know where I can go to learn more about this?
Hello ! I can’t reach 100% score. During the puzzle, 2 first lines ask for C and CC, but when I Submit, looks like 2 lines are programmed for G and GG. Did I miss something ?
Hello! I finished the puzzle with 100% success, but I was wondering what else I would need to add to the code in order to get it to compile on my computer? I copy-pasted what I wrote into a visual studio code file, but when I go to compile it, it gives an error asking for a template class for the bitset function, and I have no idea where to start.