online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <vector> class NamedBuffer { public: NamedBuffer(char const *n, uint32_t s) : name(n) , size(s) , buffer(size) { this->info(); } void info() { std::cout << "name : " << this->name << '\n'; std::cout << "size : " << this->size << '\n'; std::cout << "vsize: " << this->buffer.size() << '\n'; } // ... private: std::string name; std::vector<uint8_t> buffer; uint32_t size; // size memeber declared after buffer member // ... }; int main() { constexpr char const *name = "TestBuffer"; constexpr uint32_t size = 1024; NamedBuffer nb(name, size); }

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