online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <array> #include <vector> #include <deque> #include <utility> #include <cstddef> #include <iostream> #include <algorithm> template<typename T, std::size_t size> auto f(const std::array<T, size>& arr, T o) { auto it = std::find(arr.begin(), arr.end(), o); if ( it != arr.end() ) { std::cout << "found\n"; } else { std::cout << "not found\n"; } } template<typename T, std::size_t size> auto f2(const std::array<T, size>& arr, typename std::array<T, size>::value_type o) { auto it = std::find(arr.begin(), arr.end(), o); if ( it != arr.end() ) { std::cout << "found\n"; } else { std::cout << "not found\n"; } } int main() { std::array arr = {0u, 5u}; f(arr, 5u); // f(arr, 5); //error f2(arr, 5u); f2(arr, 5); 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