I am sometimes (randomly) getting incorrect initialization of values, which makes me think I'm using memory uninitialized somewhere. My main data structure is:
template <class state>
class learnedStateData {
public:
learnedStateData() :gCost(DBL_MAX), hCost(0), isDead(false) {}
state theState;
double gCost;
double hCost;
bool isDead;
};
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?
Let me clarify: I don't want my values to be uninitialized, but they appear to be randomly at times.