main.cpp
#include "server.h" void main() { } packet.h
#pragma once #ifndef _PACKET_H #define _PACKET_H .. #endif server.h
#pragma once #ifndef _SERVER_H #define _SERVER_H #include "packet.h" .. #endif List of errors:
LNK2005 error "public: virtual void __thiscall IncomingAuth :: handler (class Parcer &)" (? Handler @ IncomingAuth @@ UAEXAAVParcer @@@ Z) is already defined in main.obj EmulatorTop C: \ Users \ Ilya \ Documents \ Visual Studio 2015 \ Projects \ EmulatorTop \ ThreadEvents \ server.obj
If you change the main, then compiled.
main.cpp
#include "packet.h" void main() { }