![657c68f21a823672378998.png](https://habrastorage.org/webt/65/7c/68/657c68f21a823672378998.png)
Код класса:
#include "EventArgs.h"
#include <vector>
#include <string>
using namespace std;
class EventArgs {
public:
static const EventArgs Empty;
};
const EventArgs EventArgs::Empty = EventArgs();
class CmdEventArgs : public EventArgs
{
public:
enum ReturnTypes{
Nothing,
Args
};
ReturnTypes content_type;
vector<string> args;
CmdEventArgs(ReturnTypes type)
{
content_type = type;
}
CmdEventArgs(ReturnTypes type, vector<string> args)
{
content_type = type;
this->args = args;
}
static const CmdEventArgs Empty;
};
const CmdEventArgs CmdEventArgs::Empty = CmdEventArgs(CmdEventArgs::Nothing);
По неопределенной причине Empty инициализирует прекрасно.
И на будущее посоветуйте пожалуйста как решать эту ошибку, ведь она возникает по самым разным проблемам.