Example #1
-1
int main() {
    LinkedList bills;

    int selection = 10;

    string choices = "1. Input electricity bill data;\n2. Input gas bill data;\n3. Input telephone bill data;\n4. Set electricity bill rates;\n5. Set gas rate;\n6. Save bill data in a text file;\n7. Load bill data from a text file;\n0. Quit.\nYour choice: ";

    while (selection > 0) {
        cout << choices;
        cin >> selection;
		cout << endl;

		Bill *bptr;
        char billName[50];
        ofstream fout;
        ifstream fin;

        if (selection == 1) {
			bptr = new ElectricityBill();
			cin >> *((ElectricityBill *)bptr);
            bills.AddHead(bptr);
        } else if (selection == 2) {