difference between data object and data structure?

This is a discussion on difference between data object and data structure? within the C++ Programming forums, part of the General Programming Boards category; I cannot get it... I am kind of newbie in OOP...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    94

    Unhappy difference between data object and data structure?

    I cannot get it... I am kind of newbie in OOP

  2. #2
    printf("Hello Cboard\n"); codeprada's Avatar
    Join Date
    Jan 2011
    Location
    In a little room at the back of your brain
    Posts
    68
    Data Structures are simply structures
    Code:
    struct r{
        int a;
        char b;
    } rstruct;
    Data Objects
    Quote Originally Posted by www.objs.com
    In C++, an object is a region of storage with associated semantics.The declaration int i;, specifies that iis an object of type int. In the context ofthe object model of C++, the term object refers to an instance ofa class. Thus a class defines the behavior of possibly many objects (instances).Objects are usually referred to by references, which are aliasesfor an object. "The obvious implementation of a reference is as a(constant) pointer that is dereferenced each time it is used."
    We shouldn't be quick to criticize unless we can do better.
    Code:
    public function __clone() { die ( "I'm one of a kind" ); }

  3. #3
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    6,820
    Well a class is as much a "data structure" as a structure by name - they are in all ways besides default access privileges the same.
    Quote Originally Posted by phantomotap
    Can you write code while blindfolded only with the blind covering your brain? Can you code while brainfolded?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Packet Container Class
    By ChaoticXSinZ in forum C++ Programming
    Replies: 2
    Last Post: 11-01-2010, 12:07 AM
  2. Memory Leak in AppWizard-Generated Code
    By jrohde in forum Windows Programming
    Replies: 4
    Last Post: 05-19-2010, 04:24 PM
  3. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 09:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21