An example, by the way, would be the following:
Hey, whenever I run this program, it freezes up and crashes. The whole program isn't very big, but this didn't start happening until I added this class to it:
Code:
#include <string>
class Pieces
{
public:
Pieces();
private:
Pieces pieces[5];
int size;
std::string color;
};
Code:
Pieces::Pieces()
{
size = 4;
color = "white";
}
I know the class isn't really meaningful right now - I'm still building on it - but I want this issue knocked out of the way first. Again this class seems to be what's bringing down the program, and I think it may have something to do with the array in it. What's going wrong? Thanks!