Click here to Skip to main content
15,909,373 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
only problem is that i want it to be completely practical....for that i want to change the currency everyday without manually entering it because currency changes almost every day...is there any way i can do it?

What I have tried:

i have complete program bt i cant think of any solution for this?
Posted
Updated 11-Dec-16 21:33pm

1 solution

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.
 
Share this answer
 
Comments
Member 12899279 12-Dec-16 4:31am    
thanks for the help but is there any way i can use it in de vcpp that has minwg32?i have only basic knowlege of classes functions constructor destructor etc...i dont know these terms api etc i have got the concept of what you have said but dont understand how to implement it in dev cpp mingw32 compiler
Jochen Arndt 12-Dec-16 5:03am    
There are C/C++ libraries providing functions to download files or the content of web pages (e.g. cpp-netlib, libcurl, curlpp, urdl, boost::asio, poco).

While these are simpler to use than writing similar code yourself, they still require some C/C++ knowledge.

There might be also no ready-to-use builds for usage with mingw which requires building them from the sources. So using GCC on Linux or VisualStudio on Windows might be a better choice (with Windows there is an API - Application Programming Interface - to access the web and with Linux most of the above libraries are provided by distributions so that they can be installed by a single command).

Once you have retrieved the data, parsing it is the simplest task.

I don't know of a simple ready to use solution. So you have to learn about using libraries and what specific libraries are doing.
Member 12899279 22-Dec-16 7:44am    
Thanks for your kind help
CPallini 12-Dec-16 4:55am    
5.
Member 12899279 12-Dec-16 9:08am    
Thanks for the help really appreciate it (Y)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900