Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "UsersOperation.hpp"
- using namespace std;
- void OutputAllBooksToConsole(
- infoAboutBook * library,
- const int & maxLibrarySize)
- {
- for (int bookIndex = 0; bookIndex < maxLibrarySize; bookIndex++)
- {
- const int bookNumber = bookIndex + 1;
- if (library[bookIndex].title != "")
- cout <<
- bookNumber << ")" << endl << "Íàçâàíèå:" << library[bookIndex].title << endl << "Àâòîð:" << library[bookIndex].author << endl << "Òåêñò:" << library[bookIndex].text << endl;
- }
- }
- void ExitFromProgram(
- infoAboutBook * library,
- int maxLibrarySize)
- {
- for (int bookIndex = 0; bookIndex <= maxLibrarySize; bookIndex++)
- {
- library[bookIndex].author = "";
- library[bookIndex].title = "";
- library[bookIndex].text = "";
- }
- delete[] library;
- }
- int AddNewBook(
- infoAboutBook * library,
- int & currBookOffset)
- {
- cout << "Ââåäèòå íàçâàíèå" << endl;
- cin >> library[currBookOffset].title;
- cout << "Ââåäèòå àâòîðà" << endl;
- cin >> library[currBookOffset].author;
- cout << "Ââåäèòå òåêñò" << endl;
- cin >> library[currBookOffset].text;
- currBookOffset++;
- return currBookOffset;
- }
- void DeleteBook(
- infoAboutBook * library)
- {
- wcout << L"Ââåäèòå íîìåð êíèãè, êîòîðîãî âû ñîáèðàåòåñü óäàëèòü:" << endl;
- int deleteBookNumber;
- cin >> deleteBookNumber;
- // Îñâîáîæäàåì ïàìÿòü.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement