how to tell c++ a function exists before calling
if (typeof yourFunctionName == 'function') { yourFunctionName(); }
Source: css-tricks.com
c++ check if function exists
When you declare 'sum' you could declare it like: #define SUM_EXISTS int sum(std::vector<int>& addMeUp) { ... } Then when you come to use it you could go: #ifdef SUM_EXISTS int result = sum(x); ... #endif
Source: stackoverflow.com