title: Pass new object into function
body: <p>I have a function: <code>Vector::Vector integrate(Vector::Vector start, Vector::Vector end, long int elapsedtime);</code>, where a <code>Vector</code> is a class I've created:</p>
  
  <pre><code>
  class Vector {
      public: 
      double x, y, z;
                     Vector(); 
                     Vector::Vector addToSelf(Vector &right); 
  };
  </code></pre>
  
  <p>I want to call <code>integrate</code> with a blank <code>Vector</code> for it's first parameter. The constructor for the <code>Vector</code> does this by default, so I'm trying to do this:</p>
  
  <p><code>acceleration = integrate(Vector::Vector blank, wc.readAccelerometer(), time);</code>. </p>
  
  <p>However, this gives me errors:</p>
  
  <p><code>error: expected primary-expression before ‘blank’</code>. </p>
  
  <p>I thought perhaps I didn't need to give the <code>Vector</code> a name when I create it in the <code>integrate</code> function call:</p>
  
  <p><code>acceleration = integrate(Vector::Vector, wc.readAccelerometer(), time);</code></p>
  
  <p>but this gives me the same error:</p>
  
  <p><code>expected primary-expression before ‘,’ token</code>. </p>
  
  <p>I could always pass in a pointer, change the <code>integrate</code> signature to match, but this seems unnecessarily messy. I could also create a new <code>Vector</code>, <em>then</em> pass it to <code>integrate</code>:</p>
  
  <pre><code>
  Vector::Vector blank;
  acceleration = integrate(blank, wc.readAccelerometer(), time);
  </code></pre>
  
  <p>which works without errors, but I would have thought doing it on one go would be possible. What am I doing wrong?</p>
  
  <p>EDIT: Thanks to Karl von Moor's comment, I've fixed it - change <code>Vector::Vector</code> to <code>Vector</code> (because I'm not defining namespaces) and everything works. Thanks. </p>