Classes are derived datatypes.
When you want to create your own datatype, with its own methods/functions for working with it, then one should implement classes.
Example : Suppose you are given a code to create a student dataype and record there information, this is a basic code while implementing class.
char add ;
cout<<"\n enter the student roll no.";
cout<<"\n enter the student name";
cout<<"\n enter ther student address";
cout<<"\n enter the student city";
cout<,"\n the student roll no:"<<roll;
cout<<"\n the student name:"<<name;
cout<<"\n the student coty:"<<city;
As shown by np_complete, you can implement methods of a class inline, in which case you don't need to compile them as a separate translation unit. They are truly inline code, implemented in each translation unit that uses them.
i am trying to create a library management system which is supposed to be used to store/keep infp for the library and the library members( book title, author, name and picture for borrower and other stuffs). The app has 6 buttons, delete, save, add,previsous,next, and upload( for upload ...