Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STL set error with release version only

Status
Not open for further replies.

jennyy

Programmer
Joined
Jan 9, 2003
Messages
8
Location
US
What's wrong with this code? (Where have have inserted a comment, the program sometimes has an error report in the release version, but this seems to never happen in the release version)

using namespace std;

set<Action> AllPossibleActions()
{
class Action f(0);
class Action t(1);
set<Action> all;
all.insert(f);
/* error at the next statment in the release version, but only sometimes */
all.insert(t);
return all;
}

class Action()
{
public:
Action(int set_action);
private:
int action;
int size;
};

/* Constructor */
Action::Action(int set_action)
{
action = set_action;
size = 1;
}
 
Can u please tell what was the error message in release?
i suspect memory problem.

senthil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top