online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; template<typename T> struct B{ T data; }; template<typename T> struct BB : public B<T>{}; template<typename T> struct A{ public: static void test(T& src){ printf("1"); } template<typename TT> static void test(B<TT>& src){ printf("2"); } }; struct AA{ public: static void test(B<int>& src){ printf("1"); } template<typename TT> static void test(B<TT>& src){ printf("2"); } }; void OnStart(){ BB<int> bb; A<B<int>>::test(bb); // MQL:2, should be 1 AA::test(bb); // MQL:2, should be 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