You can forward declare a type when you only need to name, e.g., to form pointers, references, function value arguments, or return types. If you substantially use it, e.g., in a function definition or by dereferencing a pointer, you need the definition. The way to deal with the problem about is to declare the member function but not to define it in the class definition of State. Instead, you'd define it once the definition of Core was seen:
State::State(Core* core){
core->setState();
}