title: Sorting between signed and unsigned zeros c++
body: <p>I have to be able to sort negative zeros and zeros for an assignment i am doing at university using c++, could someone tell me why the following code does produce a negative zero? i'm stuck and i am not sure why this works... </p>
  
  <pre><code>        cout &lt;&lt; "Enter the number of elements you want to add to the vector:\n";
      cin &gt;&gt; x;
      cout &lt;&lt; "Enter the integers: \n" &lt;&lt; endl;
      for (int i = 0; i &lt; x; i++)
      {
          cin &gt;&gt; y;
          y = y - 0.0;
          cout &lt;&lt; y; 
  
          Array.push_back(y);
      }
  </code></pre>
  
  <p>If there is a better way of producing a negative zero when sorting the above vector please advise. 
  Many thanks!</p>