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