Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <vector>
- /*int add(const int a, const int b) {
- std::cout << "Xsadbd12uy4eb21u3b21yub";
- return a + b;
- }
- double add(const double a, const double b) {
- std::cout << "Xsadbd12uy4eb21u3b21yub";
- return a + b;
- }
- char add(const char a, const char b) {
- std::cout << "Xsadbd12uy4eb21u3b21yub";
- return a + b;
- }*/
- template <typename T>
- T add(const T a, const T b) {
- std::cout << "Xsadbd12uy4eb21u3b21yub";
- return a + b;
- }
- int main() {
- std::cout << add(2, 5) << '\n'
- << add(2.6, 5.4) << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement