Showing content from https://raw.githubusercontent.com/charto/nbind-examples/master/3-methods.cc below:
#include #include class MethodExample { public: unsigned int add(std::string part) { for(char &c : part) sum += c; return(sum); } static std::vector check(std::vector list) { std::vector result; MethodExample example; for(auto &&part : list) result.push_back(example.add(part)); return(result); } unsigned int sum = 0; }; #include "nbind/nbind.h" NBIND_CLASS(MethodExample) { construct<>(); method(add); method(check); }
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4