The Python solutions are notingnothing but wrapper overfor sending UCI commands to the Stockfish engine. I'm not aware there is a C++ equivalent but you can code it yourself.
I don't have a copy-and-paste ready code for you, to. To do what you want you will need:
- Start Stockfish as a child process (or as a thread). https://www.reddit.com/r/learnprogramming/comments/q8sra3/how_do_i_make_a_uci_connect_to_my_c_gui/
- Communicate with your engine appropriately (lot's of materials on Stackoverflow)
- Learn UCI commandthe UCI commands
- Start a MultiPV analysis of 10
- Parse the results. Use a bitboard implementation to generate a FEN for each move.