Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question about varaibles that I should give to functions in C++

Author: Volker Böhm

Date: 01:17:35 08/01/04

Go up one level in this thread


Hi Uri,

I read your questions twice but I am still not sure what you are asking for.
Nevertheless I try an answer.

The "variables" of the class are called "attributes". The "functions" of the
class are called "members" or "member-functions".

Don´t use attributes as parameters to members as they have direct access to
those attributes. This works very well if classes don´t get too large.

To get "perfect":
If ever you access an attribute use "getter" and "setter". A getter is a member
that gets the value of an attribute, the setter sets it´s value. I use this
method in larger classes only.

Greetings Volker





This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.