title: socket binding won't return an int
body: <p>A snippet of my code looks as follows:</p>
  
  <pre><code>int descriptor = socket(AF_INET, SOCK_STREAM, 0);
  if(descriptor &lt; 0){
      cerr &lt;&lt; "Error establishing socket connection." &lt;&lt; endl;
      return -1;
  }
  int port = 3400;
  struct sockaddr_in address;
  char buffer[140];
  address.sin_family = AF_INET;
  address.sin_addr.s_addr = htons(INADDR_ANY);
  address.sin_port = htons(port);
  int size = sizeof(address);
  if(bind(descriptor,(struct sockaddr*)&amp;address,size) &lt; 0){
      cerr &lt;&lt; "Error binding socket." &lt;&lt; endl;
  }
  cout &lt;&lt; "Waiting for connection on " &lt;&lt; INADDR_ANY &lt;&lt; " on port " &lt;&lt; port &lt;&lt; ends;
  </code></pre>
  
  <p>whenever I try compiling this, I get the following error:</p>
  
  <pre><code>error: invalid operands to binary expression 
  ('__bind&lt;int &amp;, sockaddr *, int &amp;&gt;' and 'int')
  if(bind(descriptor,(struct sockaddr*)&amp;address,size) &lt; 0){
  </code></pre>
  
  <p>Does anybody know what this could mean? <code>bind()</code> is supposed to return an integer or so I thought. My imports look like this:</p>
  
  <pre><code>#include &lt;iostream&gt;     
  #include &lt;string.h&gt;   
  #include &lt;string&gt;       
  #include &lt;sys/socket.h&gt; 
  #include &lt;sys/types.h&gt; 
  #include &lt;netinet/in.h&gt;
  #include &lt;arpa/inet.h&gt; 
  #include &lt;netdb.h&gt;  
  #include &lt;unistd.h&gt;
  using namespace std;
  </code></pre>
  
  <p>Thanks!</p>