title: how to port CArray (MFC) to linux
body: <p>I am porting a windows app to linx.
  I am trying to port CArray MFC Method to linux.
  The CArray to be ported is</p>
  
  <pre><code>CArray&lt;double,double&gt; min;
  </code></pre>
  
  <p>I have made an equivalent of this like...</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;list&gt;
  
  int main ()
  {
          struct values
          {
              double value1;
              double value2;
          };
          typedef std::vector&lt;values&gt; CArray;
          CArray min;
          CArray max;
      return 0;
  }
  </code></pre>
  
  <p>but i am getting erros like...</p>
  
  <pre><code>vec1.cpp: In function ‘int main()’:
  vec1.cpp:12:29: error: template argument for ‘template&lt;class _Alloc&gt; class std::allocator’ uses local type ‘main()::values’
  vec1.cpp:12:29: error:   trying to instantiate ‘template&lt;class _Alloc&gt; class std::allocator’
  vec1.cpp:12:29: error: template argument 2 is invalid
  vec1.cpp:12:37: error: invalid type in declaration before ‘;’ token
  </code></pre>
  
  <p>Please if anybody has work on this porting of CArray to linux equivalent, please provide the solution.</p>