title: initiate bitset with an integer declared in my function in c++
body: <p>I want to do</p>
  
  <pre><code>    int count=32;
      bitset&lt;count&gt;(a);
  </code></pre>
  
  <p>I have not put my entire code as it was irrelevant the basic thing is that I have to create a bitset of a given length and that length is calculated in the program. But this throws an error showing count cannot appear in a constant expression. What would be the solution to this.</p>