Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Object Definition? (http://www.velocityreviews.com/forums/t637333-object-definition.html)

Immortal_Nephi@hotmail.com 09-28-2008 05:36 PM

Object Definition?
 
How can you design an object? Let's say for example. You place some
global variables in the file scope. They are not objects unless they
need functions. You put global functions in the file scope. Both
global variables and global functions do not have structure. They do
not look true object. Only file scope looks like true object.

You don't know which functions belong to the global variables unless
you need to group global variables and global functions together to
become true object. The global variables look like properties. The
global functions look like action or methods.

The class is the answer when you want to create multiple objects. If
you stick with ungroup global variables and global functions in the
file scope, then it is only *ONE* (non-multiple) true object.

Please describe if I am wrong.

Nephi

Rolf Magnus 09-29-2008 03:56 AM

Re: Object Definition?
 
Immortal_Nephi@hotmail.com wrote:

> How can you design an object? Let's say for example. You place some
> global variables in the file scope. They are not objects unless they
> need functions.


In the C++ standard, everything that occupies memory is an object. If you're
talking about objects in the OOP sense, your question might be better off
in comp.object .



All times are GMT. The time now is 07:03 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.