online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<map> #include<string> #include<vector> template<typename T, std::size_t N> //---------------------v--------------->type of elements inside array named arr std::size_t getLength(const T (&arr)[N]) //------------------------------^------>length of the array { return N ; } int main() { int arr[] = {1,2,3}; std::cout<<getLength(arr)<<std::endl; std::string arr2[] = {"a", "b"}; std::cout<<getLength(arr2)<<std::endl; 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