You should really direct your question to the GNURadio mailing list. This is a very application-specific question, which isn't necessarily appropriate for SO.
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
To answer your question a bit, uhd_fft.py is just a Python program that is doing a transform on your data. You can do the same thing in C++ with GNURadio. Just edit the Python code to dump the bin data instead of plotting it and you should get what you want.