Adobe PDF
Adobe PDF
Adobe PDF
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Polymorphism - Parametric<br />
Example<br />
length: forall(E) List(E) int<br />
C++ code<br />
template <br />
int length(List head) {<br />
if (head == NULL) return 0;<br />
else return 1+length(head->next);<br />
}<br />
4/11/2008 Sundar B., BITS, Pilani. CS C362 10