Advertisement
cepxuozab

SVG_Polimorph

Aug 28th, 2023
3,749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. void Polymorph() {
  2.     using namespace std;
  3.         {
  4.             Circle c;
  5.             Object& obj = c;
  6.  
  7.             obj.Render(cout);
  8.             cout << endl;
  9.         } {
  10.             Polyline p;
  11.             Object& obj = p;
  12.  
  13.             obj.Render(cout);
  14.             cout << endl;
  15.         } {
  16.             Text t;
  17.             Object& obj = t;
  18.  
  19.             obj.Render(cout);
  20.         }
  21.     }
  22.  
  23. <circle cx="0" cy="0" r="1" />
  24.  
  25. <polyline points="" />
  26.  
  27. <text x="0" y="0" dx="0" dy="0" font-size="1"></text>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement