The compiler probably allows it as an extension, it's really not allowed in the older C++ standards.
Either initialize the object through a constructor initializer list, or enable C++11 using the flags the compiler tells you.
Example using a constructor initialize list:
class Moveset
{
public:
Moveset()
: slot1{"MOVE 1", rand() % 18, 10*(rand() % 15 + 1), 5 * (rand() % 11 + 10)}
{
}
private:
Move slot1;
};
You seem to be using an IDE of some kind, so I don't know how to add the flags, but usually somewhere in the project settings there is a tab for the compiler and its settings, where you should be able to add flags (if there isn't a checkbox for C++11 already), just add -std=c++11
there.