@TaeHunKim/

EffectiveCPPItem40

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.6735850082338704","path":"main.cpp","file":{"path":"main.cpp","content":{"asEncoding":{"base64":"I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgQm9ycm93YWJsZUl0ZW0gewogIHB1YmxpYzoKICB2b2lkIGNoZWNrT3V0KCkge3N0ZDo6Y291dCA8PCAiQm9ycm93YWJsZUl0ZW06OmNoZWNrT3V0IiA8PCBzdGQ6OmVuZGw7fQp9OwoKY2xhc3MgRWxlY3Ryb25pY0dhZGdldCB7CiAgcHJpdmF0ZToKICB2b2lkIGNoZWNrT3V0KCkge3N0ZDo6Y291dCA8PCAiRWxlY3Ryb25pY0dhZGdldDo6Y2hlY2tPdXQiIDw8IHN0ZDo6ZW5kbDt9Cn07CgpjbGFzcyBNUDNQbGF5ZXI6IHB1YmxpYyBCb3Jyb3dhYmxlSXRlbSwgcHVibGljIEVsZWN0cm9uaWNHYWRnZXQgewoKfTsKCmludCBtYWluKCkgewogIE1QM1BsYXllciBtcDsKICBtcC5jaGVja091dCgpOwogIG1wLkJvcnJvd2FibGVJdGVtOjpjaGVja091dCgpOwogIG1wLkVsZWN0cm9uaWNHYWRnZXQ6OmNoZWNrT3V0KCk7Cn0="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>

class BorrowableItem {
  public:
  void checkOut() {std::cout << "BorrowableItem::checkOut" << std::endl;}
};

class ElectronicGadget {
  private:
  void checkOut() {std::cout << "ElectronicGadget::checkOut" << std::endl;}
};

class MP3Player: public BorrowableItem, public ElectronicGadget {

};

int main() {
  MP3Player mp;
  mp.checkOut();
  mp.BorrowableItem::checkOut();
  mp.ElectronicGadget::checkOut();
}