I need to write a program that will serve as a library. The program will contain a structure called library and also contain the following variables - book name, catalog numberm, fiction or non fiction, and author. The structure will declare 3 objects, book1 , book 2 and book 3. The program will input all the information for the variables and output to the screen.
Could someone please help me to setup the structure part ?
Help with C++ program! (use structure)?
//I hope you mean for this to be a struct and not a class:
//just start with the struct{.....}
struct bookInfo {
string bkName;
int catNum; //could be float if decimal system
bool isFiction; /* Is this book fiction? TRUE or FALSE */
string authLName;
string authFName; };
/*you can declare book1, book2, and book3 inside your program like so*/
bookInfo book1;
song downloads
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment