stringstream won't convert to correct number value
<p>[SOLVED] See my answer below.</p>

<p>I am trying to use stringstream (named ss) to convert some strings to ints and some to double and such, but the values are all coming out wrong. I have a vector of strings named vec, initialized like this:<br/>
[0] = ID # in hex<br/>
[1] = phone number<br/>
[2] = last name<br/>
[3] = first name<br/>
[4] = sales number<br/>
[5] = percent of sales<br/>
Now I go through the vector and put the values into int, string, or double:</p>

<pre><code>std::string lname, fname, pnum;
int ID;
double sales, percent;

if(vec.size()!=6) {
    //throw exception
}
else {
    ss&lt;&lt;std::hex&lt;&lt;vec[0];
    ss&gt;&gt;ID;

    pnum = vec[1];
    lname = vec[2];
    fname = vec[3];

    ss&lt;&lt;vec[4];
    ss&gt;&gt;sales;

    ss&lt;&lt;vec[5];
    ss&gt;&gt;percent;
}
</code></pre>

<p>but the output looks like this for every customer. What are my ints always 1 and my doubles always this weird number?</p>

<p>Customer made: Langler Tyson 1 7667230284 2.12303e-314 2.12201e-314 </p>
