Thanks to everyone
I had another problem with a windows exception, but it turns out it was a memory problem... Are arrays of classes THAT big?!
Here is the class... an array of 100 threw an error, an array of 20 worked fine.
What could I do to make "more" without using that much memory?
Thanks for everything so far, you rule.
Code:
//"level" class definition
class level{
//Private members
int efecto; //HP change on the player (optional)
string descripcion; //Level description
string opcion[6]; //Options to choose
int resultado[6]; //Results of each option (next "level" to execute)
//Constructors (default, explicit, destructor)
public:
level();
~level();
level(int e, string d, string o1, string o2, string o3, string o4, string o5, int r1, int r2, int r3, int r4, int r5);
//Methods
public:
//Initializates a blank level just like the default constructor
void inicializarlevel(){
efecto = 0;
descripcion = "Empty level";
opcion[0] = "Null option";
opcion[1] = "Empty option";
opcion[2] = "Empty option";
opcion[3] = "Empty option";
opcion[4] = "Empty option";
opcion[5] = "Empty option";
resultado[0] = 0;
resultado[1] = 99;
resultado[2] = 99;
resultado[3] = 99;
resultado[4] = 99;
resultado[5] = 99;
}
//Takes a Player object as argument, to modify its Health if efecto is not 0
//Shows the current level and its options
void iniciolevel(Player &p);
//Takes two ints, the first (o) is the option the player chose
//the second (p), sets the variable on "main" to the next level it has
//to execute. This will be equal to one of the "resultado" members
void eleccion(int o, int &p, bool &elecheck);
};