Would anybody be able to explain to me how I would call my functions in my class from my main, cause currently my only function that is displaying to the screen is my main. I know how to call a function normally but classes are new to me.
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
using namespace std;
class menuItemType
{
public:
void getData(menuItemType item[], ofstream& outData);
void showMenu(menuItemType item[], ofstream& outData);
void printCheck (double& total, double& tax, double& totalF, ofstream& outData);
private:
string itemName;
double itemCost;
};
int main()
{
ofstream outData;
outData.open("OutMenu.txt");
cout<< " Welcome !:)/> " << endl;
cout<< "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << endl;
cout<< " *To select an Item from the list below, " << endl;
cout<< "just indicate the Item number for the item \n\n" << endl;
outData << " Welcome! :)/> " << endl;
outData << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << endl;
outData << " *To select an Item from the list below, " << endl;
outData<< "just indicate the Item number for the item \n\n" << endl;
menuItemType menu [8];
/* getData(menu, outData);
showMenu(menu, outData);*/
system("pause");
return 0;
}