"error: no match for 'operator='" Making 1 vector copy to another
<p>So i have made a instance of a class and now I am trying to use a getter to get the vector of structs that i have.</p>

<pre><code>  struct posesData{
double xInMeters;
double yInMeters;
double direction;
}
</code></pre>

<p>So now I have created a instance of the class rangeAndPosesFiles which loads the files and parses it into data structures IE the vector.</p>

<pre><code>private:
  char map[50][50];
  rangeAndPoseFiles files;
  vector&lt;posesData&gt; poses;
  int amountOfValidPoints;
  int discoveredItems[41][8];

public:
 robotAndEnviroment(){
  amountOfValidPoints = 0;
  mapFill();
  poses = files.getPosesData();
  derp();
}
</code></pre>

<p>So as you can see this line "poses = files.getPosesData();" This is where the error is being generated.</p>

<pre><code>    central:~/cpp $ clear &amp;&amp; g++ -g -W -Wall -Wextra -pedantic  -std=c++11 Main.cpp -o main
Main.cpp: In constructor 'robotAndEnviroment::robotAndEnviroment()':
Main.cpp:33:9: error: no match for 'operator=' (operand types are 'std::vector&lt;robotAndEnviroment::posesData&gt;' and 'std::vector&lt;rangeAndPoseFiles::posesData&gt;')
   poses = files.getPosesData();
         ^
Main.cpp:33:9: note: candidates are:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/vector:69:0,
                 from Main.cpp:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/vector.tcc:167:5: note: std::vector&lt;_Tp, _Alloc&gt;&amp; std::vector&lt;_Tp, _Alloc&gt;::operator=(const std::vector&lt;_Tp, _Alloc&gt;&amp;) [with _Tp = robotAndEnviroment::$osesData; _Alloc = std::allocator&lt;robotAndEnviroment::posesData&gt;]
     vector&lt;_Tp, _Alloc&gt;::
     ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/vector.tcc:167:5: note:   no known conversion for argument 1 from 'std::vector&lt;rangeAndPoseFiles::posesData&gt;' to 'const std::vector&lt;robotAndEnviroment:$posesData&gt;&amp;'
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/vector:64:0,
                 from Main.cpp:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_vector.h:448:7: note: std::vector&lt;_Tp, _Alloc&gt;&amp; std::vector&lt;_Tp, _Alloc&gt;::operator=(std::vector&lt;_Tp, _Alloc&gt;&amp;&amp;) [with _Tp = robotAndEnviroment::pos$sData; _Alloc = std::allocator&lt;robotAndEnviroment::posesData&gt;]
       operator=(vector&amp;&amp; __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_vector.h:448:7: note:   no known conversion for argument 1 from 'std::vector&lt;rangeAndPoseFiles::posesData&gt;' to 'std::vector&lt;robotAndEnviroment::pos$sData&gt;&amp;&amp;'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_vector.h:470:7: note: std::vector&lt;_Tp, _Alloc&gt;&amp; std::vector&lt;_Tp, _Alloc&gt;::operator=(std::initializer_list&lt;_Tp&gt;) [with _Tp = robotAndEnviroment::pos$sData; _Alloc = std::allocator&lt;robotAndEnviroment::posesData&gt;]
       operator=(initializer_list&lt;value_type&gt; __l)
       ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_vector.h:470:7: note:   no known conversion for argument 1 from 'std::vector&lt;rangeAndPoseFiles::posesData&gt;' to 'std::initializer_list&lt;robotAndEnvir$ment::posesData&gt;'
central:~/cpp $
</code></pre>

<p>I just want to get the vector from the rangeAndPoseFiles class and copy it to the RobotAndEviroment class But i get the error, how come?</p>