How to useAnimationMontage in C++

What was a problem and how to solve it?