Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what's wrong with my code (c++)? this is the output that I keep getting. #include #include #include using namespace std; struct library { string title;

what's wrong with my code (c++)? this is the output that I keep getting.image text in transcribed

#include #include #include using namespace std;

struct library { string title; string booknum; char author [30]; int pages ; float price; }; struct customer { string id; char name[20]; };

void addbook(int counter); void deletebook(int counter); void editbook(int counter); void searchbook(int counter); void viewallbooks(int counter); void quit();

int counter=0; void increment(int a ){ a++; counter=a; }

void decrement (int a ){ a--; counter=a; }

library books[10];

int main(){ string choice; system("CLS"); cout

void addbook(int counter){ string title,booknum; char author; int pages; float price; cout

//delete book function void deletebook(int counter){ string title; int choice; cout>choice; if (choice == 1){ books[i].title; books[i].booknum; books[i].author; books[i].pages; books[i].price; for(int a = i ; a

books[i].title; books[i].booknum; books[i].author; books[i].pages; books[i].price; cout

void searchbook(int counter){ string title; int choice; bool print = false; cout

void viewallbooks(int counter){ cout /tmp/cqLFjam1gs. o WELCOME TO THE LIBRARY - click each assigned number for your service of choice - 1 - Add Book 2 - Delete book 3 - Display book information 4 - List all books 5 - Request a book 6 - Exit Please enter your choice : WELCOME TO THE LIBRARY - click each assigned number for your service of choice - 1 - Add Book 2 - Delete book 3 - Display book information 4 - List all books 5 - Request a book 6 - Exit Please enter your choice : WELCOME TO THE LIBRARY - click each assigned number for your service of choice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

Students also viewed these Databases questions