Advertisement
WeltEnSTurm

Untitled

Apr 10th, 2012
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1.  
  2. #include <ws/io.hpp>
  3.  
  4. using namespace ws;
  5.  
  6. class Base {
  7.     public:
  8.         Base(){
  9.             io::writeln(Test());
  10.         }
  11.         virtual string Test(){
  12.             return "Base";
  13.         }
  14. };
  15.  
  16. class Sub: public Base {
  17.     public:
  18.         string Test(){
  19.             return "Sub";
  20.         }
  21. };
  22.  
  23. int main(){
  24.     Sub test;
  25.     io::writeln(test.Test());
  26.     io::getln();
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement