Re: Lahman, how ya doing?
- From: Andrew McDonagh <news@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 07 May 2005 18:40:45 +0100
Gregory L. Hansen wrote:
In article <0%Qde.43511$4v.31435@trndny03>, H. S. Lahman <hsl@xxxxxxxxxxxxxxxxx> wrote:
Responding to Hansen...
class EventElement { private: Object* recipient; int event_id; int tick_count; public: EventElement (Object* r, int e, int t) {recipient = r; event_id = e; tick_count = t;}; int getTickCount() {return tick_count;}; }
Let me ask you, why is this a class? I usually think of classes as something with member functions that do things with the data. I would have used a struct as a passive holder of data.
For one thing, it allows us to create instances which are immutable objects.
For another, we can use polymorphic calls with a class over a struct ('c' struct I take it you mean - as C++ structs are the same as Classes but with different default access rights).
.
- Follow-Ups:
- Re: Lahman, how ya doing?
- From: Gregory L. Hansen
- Re: Lahman, how ya doing?
- References:
- Re: Lahman, how ya doing?
- From: H. S. Lahman
- Re: Lahman, how ya doing?
- From: Gregory L. Hansen
- Re: Lahman, how ya doing?
- From: H. S. Lahman
- Re: Lahman, how ya doing?
- From: Gregory L. Hansen
- Re: Lahman, how ya doing?
- Prev by Date: Re: Lahman, how ya doing?
- Next by Date: Help! Difficulty understanding DB -> Object mapping
- Previous by thread: Re: Lahman, how ya doing?
- Next by thread: Re: Lahman, how ya doing?
- Index(es):
Relevant Pages
|