To address your question directly, refer this link (https://stackoverflow.com/q/145270/4565943) to interface C++ programs from Python and RCPP (http://www.rcpp.org) to connect R with C++. Cython is also an alternative if you would like to interoperate between C/C++ and Python.
Having said the above, ascertain the necessity of this interfacing before going for it. Unless you are working with embedded systems that limits what programming language you can use, like an Arduino (not that it is entirely impossible), you would be better off with working with either Python or R without C++ altogether. That is unless you have any other really good reason to go it. There is always an unavoidable latency that comes with passing data between two different programming frameworks