References, Logical Operators, and Loop Condition
<p>I'm having a problem understanding what I'm doing wrong in my code. What I'm trying to do is write a condition for a ternary operator and a do-while loop to recognize if one of my variables is above 1. Well, it is giving me an error that I don't know how to fix. What puzzles me the most is what I'll give an example of shortly. Here's my overall code. Keep in mind I'm a beginner, so there may be things that make you cringe or parts that could be improved.</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

void getInfo(int&amp;, int&amp;, double&amp;);

int main() {

   int ordered, stock;
   double charges = 10.00;

   getInfo(ordered, stock, charges);

   system("pause");
   return 0;

}

void getInfo(int&amp; ordered, int&amp; stock, double&amp; charges) {

   do {
       printf("Enter the amount of spools ordered, in stock, and handling charges: ");
       scanf_s("%i %i %lf", &amp;ordered, &amp;stock, &amp;charges);

       printf((&amp;ordered &gt; 1 &amp;&amp; &amp;stock &gt; 0 &amp;&amp; &amp;charges &gt; 0) ? "All added!\n"
           : "You messed one up. AGAIN!\n");
   } while (&amp;ordered &gt; 1 &amp;&amp; &amp;stock &gt; 0 &amp;&amp; &amp;charges &gt; 0);

}
</code></pre>

<p>Now, the error I'm getting is specifically in the ternary and the while condition. It gives me an error where the <code>&gt;</code> is after ordered for both. Now, if I make it <code>ordered</code> instead of <code>&amp;ordered</code>, the error goes away. Yet, I never get an error for <code>&amp;stock</code> or <code>&amp;charges</code>. I don't know why it's treating <code>&amp;ordered</code> differently. It also doesn't check <code>ordered</code> correctly when I take off the <code>&amp;</code>, for reasons I'm not entirely sure on. </p>

<p>Thank you to whomever is willing to help!</p>