title: C++: How to call a base class constructor with more than one argument?
body: <pre><code>class BaseClass {
  public:
    BaseClass(const byte *buff, long size) { 
       // Some Computation
    }
  };
  
  class DerivedClass: public BaseClass {
  public:
    std::vector&lt;byte&gt; filebuff;
    long buff_size;
    DerivedClass(): BaseClass(/*How should I send stuff here?*/) 
    { 
    }
    /*return type??*/  cal_func(){
     // Some computation involving file descriptors.
     // Store result in filebuff. Store size of filebuff in buff_size.
      return /*what??*/;
    }
  }
  </code></pre>
  
  <p>I can only think of the following solution:</p>
  
  <pre><code> DerivedClass(): BaseClass(&amp;filebuff[0], cal_func) 
  </code></pre>
  
  <p>In the above case, I will make function func() to return length of filebuff. I am relying on the fact that filebuff is only an address and hence it doesn't matter whether the compiler puts the computed value of func on the stack first or the first arg, filebuff.</p>
  
  <p>Please tell me whether this is a correct method for doing so. If the first argument wasn't an address and some other computed value which would've required the computation carried out in the function func, what would be the best way to go about it?</p>