I made the following changes to the program and it still gives me errors

I declared the doubles inside of private class, but they dont seem to be working
here's the code :

Code: C++
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;

class currencies
{
public:
void conUSDtoRIY (double ,double , double, double);
void getUSDtoRIY(double&, double&)const;

void getUSDtoYen (double&, double&) const;
void conUSDtoYen (double ,double , double, double);

void conUSDtoEuro (double,double,double,double);

void getUSDtoEuro (double&,double&)const;

void printJPY ();const
void printRIY ();const
void printEURO ();const

 private:
     double Yen = 127.633;
     double Euro =  1.39009  ;
     double USD =   1.0;
     double RIY =   0.2667
 
     double  amt;
     double  conamt ;

};

int main()
{
    currencies mycurrency;
   
    double amtx;
    double amtcon;
    string choice;
    string choice2;

    cout << "Thanks for using the USD currency converter program.\nThis program allows you to convert only from USD to Euro,JPY,and RIY." <<endl <<endl;
    cout << "Before we start the program, I would like you to know the basic commands that\nyou could use to interact with this program\n" <<endl;

    cout << "commands to use are as follows\n -JPY  = convert your USD to Yen \n -RIY  = convert your USD to Riyals \n -EURO = convert your USD to European Euros" <<endl << endl;
    cout << "Also you can type in 'Rates' to get information of each currencies' rate, and \ntype 'Cinfos' to get informations about each currency\n please note that the program is case sensitive so make sure you write the commands exactly as they appear in the instructions." <<endl << endl ;
    cout << "so now to start the program please type in 'Start', and when you're done you can exit the program by typing 'Exit'." <<endl<<endl;
    cin >> choice2;

    while ( choice2 == "Start" )
    {
        cin >> choice;
        if( choice == "JPY")
        {
            cout << "Enter the Dollars amount" <<endl;
            cin >> amtx;
            mycurrency.printJPY();
           
        }
        else if (choice == "RIY" )
        cout << "Enter the Dollars amount" <<endl;
        cin >> amtx;
        mycurrency.printRIY ();
    }
    else if (choice == "Euro" )
        cout << "Enter the Dollars amount" << endl;
        cin >> amtx;
        mycurrency.printEURO ();
    return 0;
}

//functions.

void currencies::getUSDtoYen (double& amtx, double& amtcon)const
{
      amt = amtx;
      conamt = amtcon;
}
void currencies::conUSDtoYen (double amt ,double conamt, double Yen, double USD)
{
    conamt = (amt*USD)/Yen //currency conversion.
}

void currencies::printJPY (double &conamt)
{
 cout << "The amount in JPY is equal to" << conamt<< endl;
}

void currencies::getUSDtoEuro (double& amtx, double& amtcon)
{
     amt = amtx;
      conamt = amtcon;
}
void currencies ::conUSDtoEuro (double amt, double conamt,double Euro, double USD)
{
 conamt = (amt * USD)*Euro;
}
void currencies::printEURO ()
{
 cout << "The amount in EURO is equal to" << conamt<< endl;
}

void currencies::getUSDtoRiyal (double& amtx, double& amtcon)
{
    amt = amtx;
      conamt = amtcon;
}
void currencies::USDtoRIY(double, double, double, double)
{
    conamt = (amt*USD)/RIY;
}

void currencies::printRIY ()
{
    cout << "The amount in RIY is equal to" << conamt<< endl;
}


can you copy it to your VS and see what's the problem????
thanks.......

Last edited by SaswatPadhi; 13Jul2009 at 23:27.. Reason: Code-Blocks