Possible Duplicate:
Call ASP.NET function from JavaScript?
"Can you call a C# function from JavaScript?" was asked by an interviewer. Is it possible? If yes, then how?
Just declare the C function extern "C" (in your C++ code) and call it (from your C or C++ code). For example: // C++ code. extern "C" void f(int); // one way.
The C++ language provides mechanisms for mixing code that is compiled by compatible C and C++ compilers in the same program. You can experience varying degrees of success as you port such code to different platforms and compilers.
Execution speed - C++ is often faster than C, because templates are a better solution to generic code than C's tendency to use function pointers. See C++'s std::sort vs C's qsort for a widely benchmarked example.
You can, but not directly. You'd have to use an AJAX implementation or write an AJAX call yourself using the XmlHttpRequest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With