title: conversion from ‘void’ to non-scalar type ‘std::pair<std::basic_string<char, std::char_traits<char>
body: <p>I have a stack of pairs in a <code>spreadsheet</code> obj:</p>
  
  <pre><code>std::stack&lt; std::pair&lt;std::string, std::string&gt; &gt; undoStack;
  </code></pre>
  
  <p>And I am trying to pop the stack and assign it to another pair:</p>
  
  <pre><code>std::pair&lt;std::string, std::string&gt; change = spreadsheets.at(i).undoStack.pop();
  </code></pre>
  
  <p>And I am getting this error:</p>
  
  <pre><code>error: conversion from ‘void’ to non-scalar type ‘std::pair&lt;std::basic_string&lt;char,   std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;’ requested
  </code></pre>
  
  <p>Whats going wrong here?</p>