Tuesday, June 20, 2006

Templates and Generics

Found this here: www.comeaucomputing.com

This is not really too good.

temples are used to create 'generic' things like function or class.

generic function

template ret-type func-name(parameter list)
{
// body of function
}

generic class

template class class-name
{
}

No comments: