Skip to content

Instantly share code, notes, and snippets.

@Temptationx
Created December 23, 2013 01:09
Show Gist options
  • Save Temptationx/8090464 to your computer and use it in GitHub Desktop.
Save Temptationx/8090464 to your computer and use it in GitHub Desktop.
class viewWeb;
class view{
public:
virtual ~view() {}
static view* creat();
protected:
view() { }
};
class viewWeb : public view{
public:
viewWeb(int){
x = 23;
}
int getX(){
return x;
}
protected:
int x;
};
view* view::creat(){
return new viewWeb(2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment