31 return add(a, b, result);
37 return divide(a, b, result);
int CALC_API calcHandler(const int kind, const int a, const int b, int *result)
指定された演算種別に基づいて計算を実行します。
計算ライブラリ (動的リンク用) のヘッダーファイル。
#define CALC_API
呼び出し規約マクロ。
#define CALC_KIND_MULTIPLY
乗算の演算種別を表す定数。
#define CALC_KIND_SUBTRACT
減算の演算種別を表す定数。
#define CALC_KIND_DIVIDE
除算の演算種別を表す定数。
#define CALC_KIND_ADD
加算の演算種別を表す定数。
#define CALC_ERROR
失敗の戻り値を表す定数。
計算ライブラリ (静的リンク用) のヘッダーファイル。
int subtract(const int a, const int b, int *result)
2 つの整数を減算します。
int divide(const int a, const int b, int *result)
2 つの整数を除算します。
int multiply(const int a, const int b, int *result)
2 つの整数を乗算します。
int add(const int a, const int b, int *result)
2 つの整数を加算します。