Posts

Showing posts with the label classes in cpp

Hospital Management Application In C++ | Using OOPs C++

 Hospital Management Application In C++ We keep improving This Application: -  #include   < iostream > using   namespace   std ; class   Hospital {      public :      int   pat_id   =   12223 ;      char   pat_name [ 50 ]   ;      char   pat_gen ;      int   age ;      float   height ;      float   weight ;      void   admit ()      {          cout << " Admit A Patient " << endl ;          cout << endl ;          cout << " Enter Patient Name " << endl ;          cin >> pat_name ;      ...

Basics Of OOPS In C++ | Classes & Objects In C++

Image
 Basics Of OOPS In C++  What is Class? Class is like a form in programming. You know in a form you have some fields where every user fills that form. So the one form template can be filled by any user. The class can be assumed as a generalized set of programs whereas many objects can access the features of that class. You can understand class by this image easily:-  Here in this example, you can see a template of a car that can be accessed by many car companies like polo, mini, beetle etc. So here polo, mini, beetle are called objects which is an instance (user) of car class. A class may have data members (attributes) and methods (functions) like the structures you can understand this concept by this image -  So here car class has methods and attributes so the objects of this class should have access to these methods and attributes. Access Specifier In OOPS C++ -  public  - members are accessible from outside the class private  - members cannot be acce...