Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
pointer to template function
#include <iostream> #include <cstdlib> #include <string> using namespace std; template <typename TYPE> TYPE Tszamolas (TYPE (*fn_ptr)(TYPE, TYPE), TYPE be1, TYPE be2) { return fn_ptr(be1, be2); } template <typename TYPE> TYPE Tplusz(TYPE a, TYPE b) { return a + b; } int main() { string str1 = "rántott"; string str2 = "hús"; cout << Tszamolas(Tplusz, 1, 3) << endl; cout << Tszamolas(Tplusz, 1.4, 3.8) << endl; cout << Tszamolas(Tplusz, str1, str2) << endl; return 0; }
run
|
edit
|
history
|
help
0
Intersected Rectangles
ncr
Project Euler - 113
Test 6(2020)
Continuous Sub Set with given sum
template
is_num_palindrom
project
VecHotel
bin search