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