View Single Post
Old 10-04-2004, 05:51 PM   #21 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Code:
float eur_to_usd_rate = 1.2422;
float cad_to_usd_rate = 0.7912;
float cny_to_usd_rate = 0.1208; 
float jpy_to_usd_rate = 0.0091; 
float sek_to_usd_rate = 0.1373;
For performance reasons, you'd like perhaps to make "hard coded" objects constants. Check out how redhead made it constant. Basically you're saying with this that the rates won't change (much). Otherwise "hard coding" doesn't make sense. But I'm sure you'll find out soon enough .

Perhaps you'll be interested in adapting his style of how define main():
Code:
int main()
{
   return 0;
}
vs "old style" incompatible versions:
Code:
void main(void)
{
}
Quote:
...but at least I tried.
Now that's something that is really appreciated around here .
__________________
Valmont is offline   Reply With Quote