Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ws/io.hpp>
- using namespace ws;
- class Base {
- public:
- Base(){
- io::writeln(Test());
- }
- virtual string Test(){
- return "Base";
- }
- };
- class Sub: public Base {
- public:
- string Test(){
- return "Sub";
- }
- };
- int main(){
- Sub test;
- io::writeln(test.Test());
- io::getln();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement