Trouble with classes communicating...

All,

Sorry if there is another thread regarding this, but I did not see one...

I am using VisualStudio 2008 to write my C++ programs for school. We are working with classes and I am having trouble with the classes and files communicating with eachother. It is not all of them, just a few of them. I have checked, and double checked, and tripple checked to make sure it wasn't something simple, like a spelling error (fixed one that way, but can't get the others still.
I have the following declarations as part of a class in a header file:

class cdrom
{
public:
cdrom();
void LoadInformation();
float ReturnCost();
void DisplayInformation();
void ChangeData();


and the following in a corrisponding .cpp file:

float cdrom::ReturnCost()
{
return Cost;
}

void cdrom::DisplayInformation()
{
cout << Name << endl;
cout << CDType << endl;
cout << fixed << setprecision(2) << "$" << Cost << endl;
}


void cdrom::ChangeData()
{
cout << Name << endl << "Would you like to change this information? Y or N\n";
cin >> choice;
if ((choice == 'Y')||(choice == 'y')) **(partial code, i didn't think the whole code section was necessary)**

I have a seperate .cpp file that uses these two pieces of information, and my main file that uses a third. I keep getting an error that the identifier is not found for ChangeData, DisplayInformation and ReturnCost.I am getting the errors specifically in the areas listed below:

Fucntion calls from Main:
DisplayCDs(pCD1, pCD2, pCD3);
ShowCosts(pCD1, pCD2, pCD3);
ChangeData(pCD1);
ChangeData(pCD2);
DisplayCDs(pCD1, pCD2, pCD3);
GiveMemoryBack(pCD1, pCD2, pCD3);

Function implementation:
void DisplayCDs(cdrom *pCD1, cdrom *pCD2, cdrom *pCD3)
{
cout << DisplayInformation(*pCD1)<< endl;
cout << DisplayInformation(*pCD2) << endl;
cout << DisplayInformation(*pCD3) << endl;
}


void ShowCosts(cdrom *pCD1, cdrom *pCD2, cdrom *pCD3)
{
float average;

cout << fixed << setprecision(2) << "$" << ReturnCost(*pCD1) << endl;
cout << fixed << setprecision(2) << "$" << ReturnCost(*pCD2) << endl;
cout << fixed << setprecision(2) << "$" << ReturnCost(*pCD3) << endl;

average = ReturnCost(*pCD1) + ReturnCost(*pCD2) + ReturnCost(*pCD3);

cout << fixed << setprecision(2) << "$" << average;
}


All of the other portions of these files communicate just fine with eachother...does anyone have any idea what I might be doing wrong on these 3???

I really appreciate any input that you can provide!
Topic archived. No new replies allowed.