D
dolphin
Is it a good thing that program mix C and C++?
You might get output more quickly with a Gemisch. Will you offend the Truedolphin said:Is it a good thing that program mix C and C++?
dolphin said:Is it a good thing that program mix C and C++?
Is it a good thing that program mix C and C++?
No so, C++ provides a mechanism (the extern "C" linkage specifier) toCBFalconer said:Mix, no. You can call C routines from C++, but not the reverse.
Is it a good thing that program mix C and C++?
Mix, no. You can call C routines from C++, but not the reverse.
No so, C++ provides a mechanism (the extern "C" linkage specifier) to
make C++ functions callable from C.
[/QUOTE]Is it a good thing that program mix C and C++?
Mix, no. You can call C routines from C++, but not the reverse.
All together now: oh yes it does!Richard said:Ian Collins said:
No, it doesn't. It makes C functions callable from C++.
Uh, yeah. It prevents the "name-mangling" of functions compiledIan Collins said:All together now: oh yes it does!
It's commonly used where a C++ function has to be passed to a C library
as a callback.
extern "C" specified the linkage type of the function, not its language.
Bill Reid said:object files pretty much at will. It is quite obvious that some people
here who are experts on the return value of main() don't understand
this.
Ian said:No so, C++ provides a mechanism (the extern "C" linkage specifier)
to make C++ functions callable from C.
Richard said:Ian Collins said:
No, it doesn't. It makes C functions callable from C++.
All together now: oh yes it does!
Kenny said:Well said, sir! And, you might add, the ethics of casting the return
value of malloc().
Note (for the uninitiated): The "casting the return value of malloc()"
thing is an idea that is taken as gospel around here, but has no real
world traction outside of this NG. It is certainly possible to disagree
with this bit of dogma, but doing so will win you no friends around here.
It's a two way street.CBFalconer said:That makes C callable from C++. Not the reverse.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.