Template example class should have public method so it can get called externally.

This commit is contained in:
Adam 2015-06-01 22:00:52 -04:00
parent cea52ca434
commit 47d3cea47e

View File

@ -445,6 +445,7 @@ int main () {
// define a class or function that takes a type parameter: // define a class or function that takes a type parameter:
template<class T> template<class T>
class Box { class Box {
public:
// In this class, T can be used as any other type. // In this class, T can be used as any other type.
void insert(const T&) { ... } void insert(const T&) { ... }
}; };