There are services in the web providing the data. A web research for "currency exchange api" should help.
An example is the free
Foreign exchange rates and currency conversion JSON API[
^].
The above uses the rates published by the European Central Bank which can be also downloaded in PDF, CSV, and XML format at
Euro foreign exchange reference rates[
^]. To use these, download the CSV or XML file daily using a C++ internet class and parse the file.
Other national banks should provide similar information.