mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Template example class should have public method so it can get called externally.
This commit is contained in:
parent
cea52ca434
commit
47d3cea47e
@ -445,6 +445,7 @@ int main () {
|
||||
// define a class or function that takes a type parameter:
|
||||
template<class T>
|
||||
class Box {
|
||||
public:
|
||||
// In this class, T can be used as any other type.
|
||||
void insert(const T&) { ... }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user