is it okay to pass member variables as parameters to member functions in C++?
<p>I also have a similar design question now in my work assignment. I have a base class like </p>

<pre><code>class base
{
protected:
  update()
  {
    // do some stuff with a and b, call it as action A 
  }

  int a, b;
};

class derived : public base
{
protected:
  update()
  {
    // want to do the same action A , but with varaiables c and d
  } 

  int c, d;
};
</code></pre>

<p>and the requirement is, derived class requires both the operations , such as action on "a and b" AND "c and d" aslo. Hence , is it okay to design a method like update(int, int) , so that I can pass parameters as and when required "a and b" AND "c and d" and perform action on them .And I know that I can write a helper method to perform that action, but this action is specific to this class I cant separate it from this. Can I have any other better alternative  for this.</p>

<p>In realtime its a bigger class and the action also not on integers ,its on some objects in turn, and the varibales should be related to the class.</p>
