Differentiate between Objects and Classes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ranvijay
    New Member
    • Feb 2014
    • 1

    Differentiate between Objects and Classes

    Differentiate between Objects and Classes in cpp
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Objects are anything that uses actual memory, like the instantiation of a class or an int or an array of long or a pointer.

    A class is a definition of a set of methods and data that go together to make an object when instantiated.

    Comment

    • Sherin
      New Member
      • Jan 2020
      • 77

      #3

      Class


      A class is a blueprint from which you can create the instance, i.e., objects.

      A class is used to bind data as well as methods together as a single unit.

      Classes have logical existence.

      A class doesn't take any memory spaces when a programmer creates one.

      The class has to be declared only once.

      Object

      An object is the instance of the class, which helps programmers to use variables and methods from inside the class.

      Object acts like a variable of the class.

      Objects have a physical existence.

      An object takes memory when a programmer creates one.

      Objects can be declared several times depending on the requirement.

      Comment

      Working...