Entry
What is a Class ?
Sep 26th, 2003 14:59
Knud van Eeden, Andrew Parry, Bhushan Dongare,
General:
========
A class is NOT an object!
Class Definition:
=================
A class is the declaration of a specific data structure and any
methods
that operate on that data. For example, the following is a class...
CMyClass
{
public:
void setValue(int iValue) { m_iValue = iValue; }
int getValue() const { return m_iValue; }
protected;
int m_iValue;
};
Object Definition:
==================
An object is an instance of a class.
CMyClass firstInst, secondInst;
Both firstInst and secondInst are objects - they are instances of the
class CMyClass.
---
see also:
C++: Class: Create: Simple: How to create a class in C++?
http://www.faqts.com/knowledge_base/view.phtml/aid/24828/fid/163