That example is essentially showing all you need to know on the Octave side so,
if there is something more related to your specific problem you want to ask for,
you need to make your question more specific.
What is the Octave function you want to call from C++, what input do you need to pass?
What output do you need to recieve? What have you tried already? What did not work?
But first, have you considered whether embedding the Octave interpreter is what
you really need? Have you considered having your C++ and Octave run as separate
processes exchanging data via files?