On Thu, Jun 11, 2009 at 6:59 AM, peternilsson42<[email protected]> wrote:
> Thomas Hruska <thru...@...> wrote:
>> peternilsson42 wrote:
>> > I've never understood why people don't declare classes...
>> >
>> >   struct student
>> >   {
>> >     student();
>> >     ~student() { cout << "i am destructor" << endl; }
>> >     void setvalue(const char *);
>> >     void display() const;
>> >
>> >   private:
>> >     char name[50];
>> >     int stunum;
>> >   };
>>
>> Because it looks weird?
>
> It seems intuitively obvious to me. :-) You don't put the
> stuff you want to hide (or restrict access to) first!

I believe his point was that you used struct instead of class, not
that you put the interesting (to users of your class) stuff first.

-- 
PJH

http://shabbleland.myminicity.com/com
http://www.chavgangs.com/register.php?referer=9375

Reply via email to