The main issue is probably ftp, where you would have to do "help site" to find information on how to get the output on your system. C++ is only needed to interprete whatever you received.
In C++, make the command-file, start ftp (with fopen()) with the command-file and interprete and display what is received.
The ftp-issue is off-topic.