C++ Uninitialized memory?
<p>I am sometimes (randomly) getting incorrect initialization of values, which makes me think I'm using memory uninitialized somewhere. My main data structure is:</p>

<pre><code>template &lt;class state&gt;
class learnedStateData {
public:
    learnedStateData() :gCost(DBL_MAX), hCost(0), isDead(false) {}
    state theState;
    double gCost;
    double hCost;
    bool isDead;
};
</code></pre>

<p>This is being stored in a STL hash_map. Any thoughts on how I might get uninitialized data (besides the theState) from this data structure?</p>

<p>Let me clarify: I don't want my values to be uninitialized, but they appear to be randomly at times.</p>
