Create an Object in OOP | C++ :
  • Create an object of a class like a variable creation of some basic data type.
  • Object is created in two places of program-
       (1) In class immediately after the closing curly bracket.

        
class book
{
  Body of book;
} b1, b2, b3 ;    // declaration of objects

       (2) In main program.
    
class book
{
  Body of book;
};
  int main()
{
  book b1, b2, b3 ;   // objects of class book
}