C++ Codes
Algorithms
Algorithm Analysis in C++
Beginners
Code Snippets
Graphics
Data Structures
File Manipulation
Games
Mathematics
Miscellaneous
Visual C++ Library
C++ > Beginners Lab Assignments sample source codes
Class for Library
Class for Library # include
# include
// Creating a basic template for book and magazine class lib { private: char title[20]; char pub[20]; unsigned int acc_no; public: //method for getting inputs void get_details() { cout<<"Enter the book title"<
>title; cout<<"Enter the publisher name"<
>pub; cout<<"Enter the accession number"<
>acc_no; } //method for showing output void show_details() { cout<<"Title : "<
>author; } void show_details() { lib::show_details(); cout<<"Autohr : "<
>editor; } void show_details() { lib::show_details(); cout<<"editor : "<
Privacy Policy
|
Link to Us
|
Links