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
- Book
- Book review
- France
- Java
- program
- history
- UK
- MySQL
- hadoop
- Italy
- Python
- leadership
- management
- web
- Malaysia
- Linux
- erlang
- management and leadership
- comic agile
- hbase
- RFID
- Software Engineering
- QT
- ubuntu
- programming_book
- Spain
- django
- Programming
- Kuala Lumpur
- agile
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