how to store an input into an array? C++
<pre><code>int b;
int array[12];

cout &lt;&lt; "Enter binary number: ";
cin &gt;&gt; b;
</code></pre>

<p>(for example: b will be 10100)</p>

<p>** How to store b(10100) into an array so that it'll be [1][0][1][0][0] **</p>

<pre><code>cout &lt;&lt; array[0] &lt;&lt; endl;
</code></pre>

<p>** output should be 1 **</p>

<pre><code>cout &lt;&lt; array[1] &lt;&lt; endl;
</code></pre>

<p>** output should be 0 **</p>

<p>Please help thank you.</p>
