Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- essay
- hadoop
- programming_book
- RFID
- Book review
- France
- agile
- QT
- history
- Book
- comic agile
- Kuala Lumpur
- Malaysia
- Python
- Programming
- ubuntu
- leadership
- Italy
- Spain
- Software Engineering
- django
- Artificial Intelligence
- hbase
- management
- program
- erlang
- web
- Java
- MySQL
- Linux
Archives
- Today
- Total
include guard 본문
2011/05/24 - [Programming/C++] - include guard
// hdr1.h #ifndef HDR1_H #define HDR1_H class DummyBase { private: int _i; public: DummyBase(int i): _i(i) {} int Get() { return _i; } void Set(int i) { _i = i; } }; #endif // hdr2.h #ifndef HDR2_H #define HDR2_H #include "hdr1.h" class Dummy: DummyBase { public: Dummy(int i): DummyBase(i) {} int operator() () { return Get(); } int operator() (int multi) { return Get() * multi; } }; #endif // tips1.cpp #include "hdr1.h" #include "hdr2.h" int main() { DummyBase db(200); Dummy d(100); }