I am new to c++ and am trying a basic factory pattern in C++11 but is failing with error: 'X' does not refer to a value. Any suggestions?
Test Code: X instance = X.createNewInstance();
Original Class
class X
{
public:
static X createNewInstance() {
return X();
};
void foo() ;
private:
X(){};
};
Aucun commentaire:
Enregistrer un commentaire