online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include<string> template <typename T> struct List { struct node { T key; node* prev; node* next; }; node* first = nullptr; node* last = nullptr; // functions }; //a function template List<T> where T is some type, as its parameter template<typename T> void palindrome(List<T> L) { std::cout<<"palindrome called"<<std::endl; } int main() { List<int> l1; //call palindrome(l1);//T will be deduced to int List<double> l2; //call palindrome(l2); //T will be deduced to double 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