Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
simple use of templete
// Simple use of function templete #include<iostream> using namespace std; template<typename T> T sum(T a, T b) { T result; result= a+b; return result; } int main() { int i=4,j=6,k; double f=8.345,g=879.45,h; k=sum<int>(i,j); h=sum<double>(f,g); cout<<endl<<"K= "<<k<<endl; cout<<endl<<"H= "<<h<<endl; }
run
|
edit
|
history
|
help
0
Sliding Game
Dar
My First Wall
Grundy Number
C++ Array printing
顺序表的实现——动态分配
Spejmer
typename T class T
Search in a rotated sorted array two methods
Building squares using smallest amount of matches