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;
}
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;
}