Link to home
Start Free TrialLog in
Avatar of AlleyBoo
AlleyBoo

asked on

Class void function not accepting parameter

I have a class vendor created. I have a public function call loadmachine. Example: void Vendor::loadmachine(); I want to read in a file to Loadmachine in my main program
Example:
sodaMachine.loadmachine(ifstream& fileName).
{
   inFile.open;
}
I am getting error c2061 syntax error identifier ifstream in my vendorType.h file. The function reads void Vendor::loadmachine().  
As you can probably see, I am new to programming. I have tried just place the items from the file into the function. sodaMachine.loadmachine(cans, bottles) neither functions work.  Any assistance would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mayank S
Mayank S
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Split between Arthur_Wood and mayankeagle.
fine with me.

AW
Please close it now.
second the motion

AW