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