CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2005
    Posts
    445

    What is the difference between an object and a class?

    Hi guys,

    Sorry for my lame question I have 1 More,
    What is the difference between an object and a class?

    Thank you
    Last edited by Salvadoravi; November 11th, 2007 at 09:25 PM. Reason: I'm sorry I've post the same ques twice, so I replace it by new one

  2. #2
    Join Date
    Jun 2006
    Location
    United States
    Posts
    112

    Re: What is the difference between Object and Instance?

    A class is a structure that contains variables and functions to perform manipulations on data.

    Objects are creations with the data type of the defined class.

    class:

    Code:
    class Thing
    {
    //stuff goes here
    };
    Object:

    Code:
    Thing objectName;
    Hope that helps.

    M.
    Programmer in the making...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured