how to search properly the vector for a value
<p>The problem I have, I have to add to a vector, the missing chars.
For example I have initially</p>

<p>s,a,p,i,e,n,t,i,a</p>

<p>and I have to add missing chars to it<br>
s,a,p,i,e,n,t,i,a,<strong>b,c,d ...</strong></p>

<p>I am trying to use this code to search for an existing value.</p>

<pre><code>for(char c='a';c!='z';++c)
    {
        if (vec.end()!=find(vec.begin(),vec.end(),c))
            vec.push_back(c);
    }
</code></pre>

<p>The find returns <code>last</code> when it fails to locate a value. But how do I know if last value was in it?</p>

<p><strong>EDIT</strong></p>

<p>When the for loop starts, for 'a' returns vec.end() so it should not go in, but goes in, and adds 'a' again in the end.</p>

<p>See this in debugger
<img src="http://img203.imageshack.us/img203/2048/bb1f.jpg" alt="alt text"></p>

<p>(The bug I have, the value in last position gets inserted twice, I have to omit this)</p>
