Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
RegexMatch
Tower Of Hanoi
Pointer to class members
Big O Notation array problem
ONP is working!
suffle array
kroliki
1163. Last Substring in Lexicographical Order
proga2
my template
Please log in to post a comment.