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 |
Tags
- Java
- erlang
- Software Engineering
- hadoop
- France
- program
- ubuntu
- management
- Malaysia
- Python
- essay
- programming_book
- leadership
- history
- Programming
- Book
- Spain
- MySQL
- psychology
- Italy
- agile
- Kuala Lumpur
- Book review
- Linux
- QT
- RFID
- web
- comic agile
- django
- hbase
Archives
- Today
- Total
C/C++ mixed programming 본문
2011/05/24 - [Programming/C++] - C/C++ mixed programming
2011/05/24 - [Programming/C++] - C/C++ mixed programming
출처: http://yesarang.tistory.com/66
이미 존재하는 C library를 C++에서 사용하는 경우
2011/05/24 - [Programming/C++] - C/C++ mixed programming
출처: http://yesarang.tistory.com/66
이미 존재하는 C library를 C++에서 사용하는 경우
// max.h int max(int a, int b); // cppmain.cpp #includeextern "C" { #include "max.h" } using namespace std; int main(void) { int im = max(100, 30); cout << "int max = " << im << endl; } /* $ gcc -c max.c $ g++ -c cppmain.cpp $ g++ -o cppmax cppmain.o max.o $ ./cppmax int max = 100 */
Comments