title: expression must be a modifiable lvalue by using template class
body: <p>I have a template vector class. This is how a part of it looks like:</p>
  
  <pre><code>template&lt;class Type&gt;
  class Vector
  {
  public:
      Vector(int size)
      {
          MyTime = new Type[size];
          m_size = size;
          m_current = -1;
      }
  
  void set(int i,Type &amp;data)
  {
      data[i]=Mytime[i];
  }
  
  private:
      Type* MyTime;
      int m_size;
      int m_current;
  };
  </code></pre>
  
  <p>Then i wish to use the set method above to set the value into a string "records".</p>
  
  <pre><code>    for(int i=0 ; i&lt;count ; i++)
  {
      records.set(i)=dateList.get(i)+timeList3.get(i);
  }
  </code></pre>
  
  <p>But it gives me two errors:
  1. too few argument in function call.
  2. expression must be a modifiable lvalue.
  Both errors appear at the records.set(i).</p>
  
  <p>The declaration of "records" is:</p>
  
  <pre><code>Vector&lt;string&gt; records(100);
  </code></pre>
  
  <p>This makes me quite confuse. May I know how to solve it?</p>