online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <iostream> class BaseWithPrint { public: static void print(int i) { std::cout << "Base::print\n"; } }; class BaseWithoutPrint { }; template <typename B> class Derived : public B { public: static void print(bool b) { std::cout << "Derived::bool_print\n"; } template <typename T> static void print(T t) { std::cout << "Derived::print\n"; } void Foo() { print(1); print(true); print("foo"); } }; int main() { Derived<BaseWithPrint> d1; d1.Foo(); Derived<BaseWithoutPrint> d2; d2.Foo(); 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