online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <vector> #include <string> ///----------------------------------------------------------------------------| /// Конфигурация программы. ///----------------------------------------------------------------------------: struct Config { unsigned H = 10 ; /// Высота доски. unsigned W = 30 ; /// Ширина доски. wchar_t C = '.'; /// Символ заполнения. void load_from_file(){ /* ... */ } }; const Config cfg; ///----------------------------------------------------------------------------| /// Виртуальный экран. ///----------------------------------------------------------------------------: struct VScreen { VScreen() : mat(cfg.H, std::wstring(cfg.W, cfg.C)) { } std::vector<std::wstring> mat; }; ///----------------------------------------------------------------------------| /// Конкретный способ или девайс вывода на монитор. ///----------------------------------------------------------------------------: struct Hard { Hard& operator<<(const VScreen& scr) { for(const auto& s : scr.mat) { std::wcout << s << '\n'; } std::wcout << '\n'; return *this; } }; ///--------------------------| /// Тест. | ///--------------------------: void test() { VScreen scr; Hard hard; hard << scr; } ///----------------------------------------------------------------------------| /// Старт. ///----------------------------------------------------------------------------: int main() { test(); std::cin.get(); }

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