Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public T Add(T val1, T val2)
- {
- return val1 + val2;
- }
- public T Add(T val1, T val2)
- {
- //Num<T> defines a '+' operation which returns a value of type T
- return (new Num<T>(val1) + new Num<T>(val2));
- }
- template < class T >
- T add(T const & val1, T const & val2)
- {
- return val1 + val2;
- }
- template <typename T>
- T Add(T val1, T val2)
- {
- return val1 + val2;
- }
- #define ADD(A,B) (A+B)
- template<typename T>
- T add(T x, T y)
- {
- return x + y;
- }
Add Comment
Please, Sign In to add comment