Generally speaking, you cannot call FF as an API in your programs, neither in C++ nor Python. But, if you mean you want to call it as an external program, it can be done in C++ with a system call. This sort of offline linking is always possible, in which you call FF executable to solve a problem and write the solution the disk (you wait for it), and then, you collect the answer in your own code.
Another solution, which of course requires more effort and some architectural changes to your code, is the other way around. I mean you can call your C++ codes in FF as external functions (and not an external executable binary). It’s possible to build C++ codes as dynamics libraries and load them inside FF as a sort of plugin. FF comes with a script called
ff-c++ that makes this process easier. You can find a couple of examples for various types of functions in FF website and examples.