@TaeHunKim/

AggressiveOptimisticCybernetics

C++11

No description

fork
loading
Files
  • main.cpp

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.2592003709083186","path":"main.cpp","file":{"path":"main.cpp","content":{"asEncoding":{"base64":"I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgQmFzZSB7fTsKY2xhc3MgRGVyaXZlZDogcHVibGljIEJhc2Uge307Cgp2b2lkIHRlc3QoQmFzZSYgYikgeyBzdGQ6OmNvdXQgPDwgIkJBU0UiIDw8IHN0ZDo6ZW5kbDsgfQp2b2lkIHRlc3QoRGVyaXZlZCYgZCkgeyBzdGQ6OmNvdXQgPDwgIkRFUklWRUQiIDw8IHN0ZDo6ZW5kbDsgfQoKaW50IG1haW4oKSB7CiAgQmFzZSogYiA9IG5ldyBEZXJpdmVkKCk7CiAgdGVzdCgqYik7Cn0="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>

class Base {};
class Derived: public Base {};

void test(Base& b) { std::cout << "BASE" << std::endl; }
void test(Derived& d) { std::cout << "DERIVED" << std::endl; }

int main() {
  Base* b = new Derived();
  test(*b);
}