title: C++ template class prototype, function definiton
body: <p>I want to write a function that creates a "Vector" (template), stores a couple of values in it, then returns that vector.  I'm defining the function below "main" and so am using the prototype:</p>
  
  <pre><code>Vector&lt;double&gt; VectorMouseClick;
  </code></pre>
  
  <p>Is this the correct prototype?</p>
  
  <p>After "main" I'm defining the function and am trying to do it this way but am not sure if it's the correct way to do it:</p>
  
  <pre><code>Vector&lt;double&gt; VectorMouseClick()
  {
      Vector&lt;double&gt; vector();
       ...some code manipulating values and storing them in "vector"...
      return vector;
  }
  </code></pre>
  
  <p>If a function is returning a class I specify (aka Vector), how do I write the prototype?  Since it's a template class do I do it like above:
      Vector VectorMouseClick;
  or is it:
      Vector VectorMouseClick; 
  (as like the other prototypes (int ReturnValues, void SomeFunct, etc)</p>
  
  <p>When exactly can I use "void" on a prototype?  Is this only for functions that don't "return" a value?  I've looked through the answers on here but as I'm new to C++ some of them are a little hard to understand.  Any help would be greatly appreciated!</p>