title: convert vector<bool> to decimal (as string)
body: <p>With this function we can easily convert vector to decimal (integer):</p>
  
  <pre><code>vector&lt;bool&gt; A = {0, 1, 1, 1,0,1}; # A size will change during run time
  long int integer = 0, n = 0;
  
      for (auto i : A)
      {
          if (i)
          {
              integer += pow(2, n);
          }
          n = n + 1;
      }
  </code></pre>
  
  <p>But if the vector has more than 64 elements the results will be unpredictable.</p>
  
  <p>How can we do write similar function but returning string instead?</p>