online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include "foo.h" #include <iostream> int main() { foo f; bar b; std::cout << f.encode(10) << '\n'; std::cout << f.encode(b) << '\n'; return 0; }
#include "foo.h" template <> int foo::encode<bar>(const bar& t) { return 1; }
#ifndef FOO_H #define FOO_H class bar {}; class foo { public: template <typename T> int encode(const T& t); }; template <typename T> int foo::encode(const T& t) { return 0; } template <> int foo::encode<bar>(const bar& t); // added const #endif

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