my school project is to make a personal library.
it will show me 5 catergories,math,physics,chemistry and C++ and EXIT.
inside each catergories,it contains 5 books.
after the books is selected,it will remove from the list.
book will be count in the front menu and book titles being shown.
So far i have done all the instruction except remove the book from the list after being selected. T.T
char book[6][50]={
"1. C++ for beginners",
"2. Advanced C++",
"3. C++ for Engineers",
"4. Problem-based C++",
"5. C++ for Dummies",
"6. Return to Main Library Menu"
};
after i select book 1,
i wan to remove "1. C++ for beginners", from the list,anyone have any idea how to do tat?
it will helps me a lot,thankx.
HEY! What happened to "The Complete Idiot's Guide to C++"!?!
Jokes aside, the only sane way to do that while preserving your array is to delete everything in part you're deleting, and then get the next element, reassign it to the one you just deleted the contents of, reassign the next one as well, etc...
Show some code. If you don't want to use vectors or not familiar with it. I suggest you assign null to the selected books then an if statement should do the rest.