Computer Science, asked by tejaswini2379, 1 year ago

Advantages of generic programming in c++

Answers

Answered by Anonymous
0
Generic Programming is better because it doesn't require the attributes of the objects being manipulated to be explicitly declared or known. The canonical example is the templated max() function:

template <typename T> T max (T a, T b){ return (b < a) ? a : b;}
Similar questions