You want to link a c++ program to c functions. How would you do it?
Answer / Monark Chawla
"To link a C++ program to C functions, you can use the extern "C" keyword in your C++ source files. This tells the compiler to treat the following code as if it were written in C. You should also compile your C files with the -c flag and include them in the C++ program's linking step using a linker script or by manually listing object files."
| Is This Answer Correct ? | 0 Yes | 0 No |
To what does “event-driven” refer?
What is implicit pointer in c++?
What is oops in c++?
Which software is best for programming?
What are templates? where we should use it?
Define what is constructor?
What is the difference between struct and class?
what are the events occur in intr activated on interrupt vector table
What is a constructor initializer list and when we use constructor initializer list?
What is extern c++?
What are pointers used for c++?
Why is swift so fast?