Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Members of classes are defined slightly differently than those of nontemplated classes. Continuing the preceding example:
template <class T, int i>
int TempClass< T, i >::MemberSet( T a, int b )
{
if( ( b >= 0 ) && (b < i) )
{
Tarray[b++] = a;
return sizeof( a );
}
else
return -1;
}