swig/Examples/javascript/pointer/example.cxx
2013-09-27 03:25:28 +02:00

16 lines
246 B
C++
Executable file

/* File : example.c */
void add(int *x, int *y, int *result) {
*result = *x + *y;
}
void subtract(int *x, int *y, int *result) {
*result = *x - *y;
}
int divide(int n, int d, int *r) {
int q;
q = n/d;
*r = n - q*d;
return q;
}