Posted by Frank Hale on 1999-03-25
eerttraw wrote:
>
> template <class Any>
> void swap(Any &a, Any &b)
> {
> Any temp;
> temp = a;
> a = b;
> b = temp;
> };
>
Thanx for your help. After investigating templates I was able to convert
some C code for singly linked list that I wrote to C++ using templates.
This was cool because now the list is generic and you can add any kind
of data to it.
Thanx a million!!!
--
From: Frank Hale
Email: frankhale@xxxxxxxx.xxx.xxx
ICQ: 7205161
Website: http://www.franksstuff.com
Previous post | Next post | Timeline | Home