title: Classes, Member Functions & Separate compilation
body: <p>Anyone knows how to implement a function to use Classes and move functionality into the classes. How can i add appropriate member functions (or methods) to each class so as to implement the functionality of the function .. maybe possibly adding parametized constructors?? For example, how would i do so for a function initially like this:</p>
  
  <pre><code>//constant definitions
  const int MAX_NUM_ACCOUNTS = 50;
  
  BankAccount account[MAX_NUM_ACCOUNTS];
  
  int findacct(const BankAccount account[], int num_accts, int requested_account);
  
  {int main()}
  
  // Function findacct:
  int findacct(const BankAccount account[], int num_accts, int requested_account)
  {
      for (int index = 0; index &lt; num_accts; index++)
          if (account[index].acct_num == requested_account)
              return index;
      return -1;
  }
  </code></pre>