C++ arithmetic if operator
<p>I've been trying to get the arithmetic if operator to work but I just van't seem to do it?
I'm new to C++ and still learning the basics but I'm just wondering if I'm using this operator correctly. It suppose to return false if x &lt; y. Is this the correct way to do it? I'm aware I can use an if else but I'm just wondering if I can also do it like this and if I can what I'm doing wrong.</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;
int x =0;
int y =1;

bool test()
{
    return (x &lt; y) ? true : false;
}

int main()
{
cout &lt;&lt; test;
return 0;
}
</code></pre>
