1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-07-31 03:50:32 +02:00

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:
template<class T>
class Box {
public:
// In this class, T can be used as any other type.
void insert(const T&) { ... }
};