0

McCauleyCurrencyConverterFunction.cpp

McCauleyCurrencyConverterHeader.h

McCauleyCurrencyConverterMain.cpp

Guys I am trying to help a friend of mine with this project they have due in a few days and because I program in Java mainly I am a bit rusty with this. I can not figure out why my getInput function shows up under the AlgolBank namespace but when I build it C says it is not. Can anyone point me in the right direction on this?
Thanks so much for help in advance

Attachments
#include <iostream>
#include "McCauleyCurrencyConverterHeader.h"
#include <iomanip>
#include <cstdlib>
#include <fstream>

using namespace std;

namespace AlgolBank
{
	void getInput(int& initialCurrency, double& amount, int& finalCurrency)
	{
		cout << "1. Coins\n 2. Rings\n 3. Stars\n 4. Rupees\n 5. Gil\n" << endl;
		cout << "Looking at the list above, please choose which currency you are converting from: " << endl;
		cin >> initialCurrency;
		cout << "Please enter the amouth of money you wish to convert: " << endl;
		cin >> amount;
		cout << "Choosing from the list above, please select which currency you would like to convert to: " << endl;
		cin >> finalCurrency; 
	}
}
namespace AlgolBank
{
    double CoinsToCoins;
	double CoinsToRings;
	double CoinsToRupees;
	double CoinsToStars;
	double CoinsToGil;
	double RingsToCoins;
	double RintsToRupees;   
	double RingsToStars;
	double RingsToGil;
	double RingsToRings;
	double RupeesToRupees;
	double RupeesToCoins;
	double RupeesToStars;
	double RupeesToGil;
	double RupeesToRings;
	double GilToGill;
	double GilToRupees;
	double GilToRings;
	double GilToCoins;
	double GilToStars;
	double StarsToGil;
	double StarsToStars;
	double StarsToCoins;
	double StarsToRings;
	double StarsToRupees;
}
// Lauren McCauley 
// CS 231-01
// Project 1
// Due DAte: 11/1/10
// Desciption:

#include <cstdlib>
#include <iostream>
#include <fstream>
#include <iomanip>

using namespace std;

// Project headers
#include "McCauleyCurrencyConverterHeader.h"
using namespace AlgolBank;

int main()
{
    // declare variables
    int initialCurrency;
    double amount;
    int finalCurrency;
	
    // set precision to 2 decimal places
    cout << fixed << showpoint << setprecision(2);
    
    // Get input the user entered
	AlgolBank::getInput(initialCurrency, amount, finalCurrency);
    
    system("PAUSE");

}
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by adaniel058
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.