online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#ifdef __cplusplus #include <iostream> #endif class C{ public: struct A{ char aaa; }; template<typename T> void test(A&, T&, T&, void* = NULL){ printf("1"); } template<typename T> void test(T&, T&, T&){ printf("2"); } }; struct B : public C::A{ char data; }; struct D{ char data; }; void OnStart(){ C c; B b; D d; c.test(b, b, b); // result: 2 c.test(b, d, d); // result: 1 } int main(){ OnStart(); 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