online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include "interface.h" int main() { //call member function foo to confirm that it works interface::Sounds::val.foo(); return 0; }
#pragma once #include <iostream> class A{ public: //public added here void foo(); }; namespace interface{ namespace Sounds{ //note the inline used here inline A val{}; }; }
#include "interface.h" void A::foo(){ std::cout<<1; } //nothing needed here as we used inline in the header

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