Getting -858993460 as a result c++
<p>The program send me -858993460 value on a[ch] an b[nech] why ?? i cant understand that ... if i use <code>cout&lt;&lt;m[i]</code> on place of <code>cout&lt;&lt;a[ch]&lt;&lt;endl;</code> it works fine ... shows me the even and odds but when i try to send them to another array the value goes wrong ( I need those another two arrays a[ch] and b[nech])</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;conio.h&gt;
#include &lt;string&gt;
#include &lt;cstdlib&gt;
#include &lt;stdlib.h&gt;
using namespace std;
int main()

 {
int i,n;
int m[3], a[3]={0}, b[3]={0};
int ch=0, nech=0;
for(i=0; i&lt;3; ++i)
{
    cout&lt;&lt;i+1&lt;&lt;". Studenski fark. nomer: ";
    do
    {
        cin&gt;&gt;m[i];
    }
    while(!(m[i]&gt;=1e7 &amp;&amp; m[i]&lt;1e8));
    if(m[i]%2==0)
    {
        m[i]==a[ch]; ch++;
        //cout&lt;&lt;m[i]&lt;&lt;endl; "without the down 'fors' it works"
    }
    else 
    {
        m[i]==b[nech]; nech++;
        //cout&lt;&lt;m[i]&lt;&lt;endl; "without the down 'fors' it works"
    }
}
cout&lt;&lt;"\nVsichki fakultetni nomera: "&lt;&lt;endl;
for(i=0; i&lt;3; ++i)
cout&lt;&lt;m[i]&lt;&lt;"\t";
cout&lt;&lt;"Chetni fark nomera: \n";
if(ch!=0)
    for(i=0;i&lt;ch;i++)
        cout&lt;&lt;a[ch]&lt;&lt;"\t"; //"with {0} on 'a' I receive 0 as result"
else 
    cout&lt;&lt;"nqma chetni fak nomera";
if(nech!=0)
    for(i=0;i&lt;nech;i++)
        cout&lt;&lt;b[nech]&lt;&lt;"\t"; //"same here 0 as result with {b}"
else
    cout&lt;&lt;"Nqma nechetni fak nomera";

getch();
 }
</code></pre>
