online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <array> #include <string> #include <algorithm> static constexpr int size{70}; const char* str = "1110"; std::array<int_least8_t, size> digits; int main() { int i = 0; for(auto c = str; *c; ++c, ++i) { digits[i] = *c - '0'; } std::cout << "Count=" << i << std::endl; std::for_each(std::begin(digits), std::begin(digits) + i, [](const auto& Value) { std::cout << "Value=" << std::to_string(Value) << std::endl; }); return 0; }

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