Question: Please fix the errors and finish coding this. C++ was used TOPIC: Supermarket Inventory and Billing System #include #include #include #include #include #include #include #include
Please fix the errors and finish coding this. C++ was used
TOPIC: Supermarket Inventory and Billing System
#include
using namespace std;
fstream file;
void time() { time_t tim; //create variable time(&tim); //pass variable to time function cout< void printlines() //for printing the stars as shown { cout<<" _________________________________________________________________________________________________________ "< void display() { cout< } //****************************************************************************// //***************Class User***************// class user { private: char username[20]; char password[20]; public: void add_user() { cout<<" \t\t\tADD USER "; cout<<" \t\tEnter username and password "; cout<<"\tUsername: "; cin>>username; cout<<"\tPassword: "; cin>>password; file.open("user.txt",ios::app|ios::out); file.write(reinterpret_cast void customer::c_read() { display(); cout<<"Enter the full name of the customer: "; cin>>fname; cin>>lname; cout<<"Enter the address of the customer: "; cin>>add; cout<<"Enter the contact number of the customer: "; cin>>cn; } void customer::c_display() { cout<<"Name: "< //***************Class Product***************// class product : public user { protected: unsigned int id; char name[50]; float rate; float dis; public: void create_product(); void show_product(); void display_all(); void display_sp(); void price_list(); void modify_product(); void delete_product(); void fread() { file.read(reinterpret_cast void product::create_product() { cout<<" Enter the product ID: "; cin>>id; cout<<" Enter the product name: "; cin>>name; cout<<" Enter the product rate: "; cin>>rate; cout<<" Enter the discount (%): "; cin>>dis; file.open("product.dat",ios::app|ios::out); file.write(reinterpret_cast void product::show_product() { cout<<"**************************************"; cout<<" Product ID: "< void product::display_all() { cout<<" \t\tDISPLAYING RECORD "; file.open("product.dat",ios::in); file.seekg(0); file.read(reinterpret_cast void product::display_sp() { int n,flag=0; cout<<"Enter the product ID of the product to be displayed: "; cin>>n; file.open("product.dat",ios::in); file.seekg(0); while(!file.eof()) { file.read(reinterpret_cast void product::price_list() { file.open("product.dat",ios::in); cout<<"=================================================== "; cout<<"\t\t\t\tPRODUCT MENU "; cout<<"=================================================== "; cout<<"Product ID\t\tNAME\t\tPRICE "; file.seekg(0); file.read(reinterpret_cast void product::modify_product() { int n,pos,flag=0; cout<<" Enter the product ID of the product to be modified: "; cin>>n; file.open("product.dat",ios::in|ios::out); while(!file.eof()) { file.read(reinterpret_cast
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
