H
Herman.Schultz
Hi,
I have a c++ program, and I would like to use a c library (e.g. curl
library for http).
Where are the things i need to do to use a c library in a c++
program?
I read some articles that i need to wrap 'extern "C"' in my c-code.h:
from http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
extern "C" {
#include "my-C-code.h"
}
But my question is I currently is NOT doing that and yet my program
still compiles. So why do I need to put the 'extern "C"' ?
Thank you.
I have a c++ program, and I would like to use a c library (e.g. curl
library for http).
Where are the things i need to do to use a c library in a c++
program?
I read some articles that i need to wrap 'extern "C"' in my c-code.h:
from http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
extern "C" {
#include "my-C-code.h"
}
But my question is I currently is NOT doing that and yet my program
still compiles. So why do I need to put the 'extern "C"' ?
Thank you.