| <<< Template syntax for classes | Index | Template internals >>> |
Places to use the template parameter:
template < typename ValueT >
class Stack {
public:
// Constructor name
explicit Stack< ValueT >( int initial_size );
// Arguments of the class type
Stack< ValueT >( Stack< ValueT > const& other );
// Other function arguments
void push( ValueT const& item );
private:
// Types of members
ValueT* m_ptr_data;
};//class Stack
| <<< Template syntax for classes | Index | Template internals >>> |