Map::using size() and looping
<pre><code>//employee is class with public members salary and nname
    int main()
    {
        map&lt;int,employee&gt; employees;

        employee e1;
        strcpy(e1.nname,"aaa");
        e1.salary=25000;

        employee e2;
        strcpy(e2.nname,"ccc");
        e2.salary=26000;
        employees[1]=e1;
        employees[2]=e2;

        employee e3;
        strcpy(e3.nname,"bbb");
        e3.salary=26000;

       employees[5]=e3;

       employee ee;

       cout&lt;&lt;employees.size()&lt;&lt;endl;

       for(int i=0;i&lt;employees.size();i++)
        {
            ee=employees[i];
            cout&lt;&lt;ee.nname&lt;&lt;endl;
        }

    o/p:     3               -      //so i=3       displays employees[0],1,2,3
             aaa             -      //i=
             ccc             -
                             -       //2 blank lines
                             -    // &lt;---why blank line cming ,ok cause no data but why it 
             bbb             -      //executed 4th and 5th time and we got 
                                    //  employees[5] -----              bbb?????
                                    //when i printed value of"i" i got from 0 to 5!!!
--------------
can any1 explain thanx in advance
</code></pre>
