how to tell c++ a function exists before calling
if (typeof yourFunctionName == 'function') {
yourFunctionName();
}
how to tell c++ a function exists before calling
if (typeof yourFunctionName == 'function') {
yourFunctionName();
}
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us