This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| struct _sorter_arg_type{void *array; | |
| int elem_count; | |
| int elem_size; | |
| int (*comp)(const void*, const void*); | |
| bool is_descending;}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <stack> | |
| #include <map> | |
| #include <functional> | |
| int main() { | |
| std::stack<double> values; | |
| std::map<std::string, | |
| std::function<double(const double& x, const double& y)> > oper{ | |
| {"+", [](const double& x, const double& y) { return x + y; }}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include "oper_private.hpp" | |
| int main() | |
| { | |
| Oper calc; | |
| calc.import_operator("multiply","multiply"); | |
| calc("multiply",5,7); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef ADDDLL_EXPORTS | |
| #define ADDDLL_API __declspec(dllexport) | |
| #else | |
| #define ADDDLL_API __declspec(dllimport) | |
| #endif | |
| #include <vector> | |
| #ifdef __cplusplus | |
| extern "C" { |