Content deleted Content added
DuncanHill (talk | contribs) Fixing harv/sfn errors. Please watchlist Category:Harv and Sfn no-target errors and install User:Trappist the monk/HarvErrors.js to help you spot such errors when reading and editing. |
No edit summary Tags: Mobile edit Mobile web edit |
||
Line 29:
This C++14 implementation is based on the pre C++98 implementation in the book.{{sfn|Gamma|Helm|Johnson|Vlissides|1995|page=122}}{{Which one|date=August 2024}}
<syntaxhighlight lang="c++">
import std;
enum class ProductId {MINE, YOURS};
// defines the interface of objects the factory method creates.
Line 45 ⟶ 44:
public:
void print() {
std::
}
};
// )implements the Product interface.
class ConcreteProductYOURS: public Product {
public:
void print() {
std::
}
};
|