online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <bitset> #include <cstring> int main(){ int okRowCounter = 0; for (int i = 0; i<= 32767; i++){ bool isItOkRow = true; std::bitset<15> bitset = i; auto bitString = bitset.to_string(); char charArr[16] = {0}; std::copy(bitString.begin(), bitString.end(), charArr); char prevSymbol = 0; int j = 0; for (char currentSymbol : charArr) { if ((prevSymbol == '1') && (currentSymbol == '1')) { std::cout << "We are fuckd at " << charArr << " sequence" << std::endl; isItOkRow = false; break; } j++; prevSymbol = currentSymbol; } if (isItOkRow) { okRowCounter++; std::cout << "Seems like " << charArr << " is ok row" << std::endl; } } std::cout << "Shit was getted done! Ok-row count is: " << okRowCounter << std::endl; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue