Logo

Programming-Idioms

History of Idiom 190 > diff from v2 to v3

Edit summary for version 3 by chardan:
New Cpp implementation by user [chardan]

Version 2

2019-09-27, 13:20:42

Version 3

2019-09-27, 22:36:04

Idiom #190 Call an external C function

Declare an external C function with the prototype

void foo(double *a, int n);

and call it, passing an array (or a list) of size 10 to a and 10 to n.

Use only standard features of your language.

Idiom #190 Call an external C function

Declare an external C function with the prototype

void foo(double *a, int n);

and call it, passing an array (or a list) of size 10 to a and 10 to n.

Use only standard features of your language.

Extra Keywords
C interoperability
Extra Keywords
C interoperability
Code
extern "C" void foo(double *a, int n);