online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <cstdio> #include <string> constexpr size_t MAX_LEN = 512; int main() { std::string imageFileName = "/image/file/name"; imageFileName.resize(MAX_LEN); // ... if (auto len = imageFileName.size(); len >= MAX_LEN) { printf("File path %s is too long (max len: %lu): %lu\n", imageFileName.c_str(), MAX_LEN, len); return EXIT_FAILURE; } printf("File path %s is valid\n", imageFileName.c_str()); // ... }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text



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