Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Polymorph() {
- using namespace std;
- {
- Circle c;
- Object& obj = c;
- obj.Render(cout);
- cout << endl;
- } {
- Polyline p;
- Object& obj = p;
- obj.Render(cout);
- cout << endl;
- } {
- Text t;
- Object& obj = t;
- obj.Render(cout);
- }
- }
- <circle cx="0" cy="0" r="1" />
- <polyline points="" />
- <text x="0" y="0" dx="0" dy="0" font-size="1"></text>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement