I
Ivan Vecerina
mereba said:OK. I just compiled and run Erik's rewrite, and it works perfectly. I
guess I'm now left to figure out how to write a GUI for this small
program. Earlier posters have advised that I should join other forums
for topics about GUIs. However, I would very much like for the people
who pointed me to all the right directions to suggest GUI tools that I
should try out and select. I would want to be able to let this program
run on both windows and linux systems.
Someone already mentioned Qt as a GUI framework, which can be used
on both Windows and Linux. It is free if you accept to use the
GPL licence ( make your source code available as well ).
See http://trolltech.com/products/qt/
Other cross-platform GUI framework with more liberal licenses
include wxWidgets (www.wxwidgets.org) or the lightweight
FLTK (www.fltk.org).
Another tip: a classic example application is a temperature
converter (Celsius to Fahrenheit). It would be easy to modify
such an application to do what you need. You should be able
to find a few examples in C++, as well as in other languages.
Finally, unless there is a reason for you to use C++, you may
want to consider using another for this job. For instance, if
a javascript-enabled browser is available on all your target
computers (be it Windows, MaxOSX, Linux, BSD, or whatever),
a converter could be provided as a simple HTML file:
<html> <head>
<title>Currency Converter</title>
</head> <body>
<font size=+1>Enter a value in either field and press tab
<br /><br />
<form>
Old currency: <input type="text" name="Old" value="0"
onChange="New.value = (this.value/100).toFixed(2) ">
<br /><br />
New currency: <input type="text" name="New" value="0"
onChange="Old.value = (this.value*100) ">
</form
</body> </html>
Save the few lines above as convert.html and open it in
a web browser. Easy to edit and improve...
[ sorry for being OT, but even though I make my living
using C++, I wouldn't use it for that job
Regards,
Ivan