title: how to make a function that takes binary argument?
body: <p>so i have this function that returns a binary representation in c: </p>
  
  <pre><code>long int int2bin(int d)
  {
      int rem, pow = 1;
      long int b = 0; 
      while(d &gt; 0) 
      {
          rem = d % 2 ;
          b += (pow * rem);
          d /= 2;
          pow *= 10;
      }
  
      return b;
  }
  </code></pre>
  
  <p>so from this i was wondering how i might go about having a bin2int() function: </p>
  
  <pre><code>long int bin2int( bin b);  
  </code></pre>
  
  <p>and you would use it like this: </p>
  
  <pre><code>bin2int(10011); 
  </code></pre>
  
  <p>and i could this </p>
  
  <pre><code>printf("%i\n", bin2int(10011));
  </code></pre>
  
  <p>to get 19  </p>