I have a enumerations named Color, Return_main_menue and Playertype in including.h like so:
enum Color { Red, Orange, Grey, Blue, Green, White, Purple };
enum Return_main_menue { Start, Credits, Help };
enum Playertype { Computer, Human };
I've also a source file named tools.cpp plus the tools.h tools.h:
#include "including.h"
Return_main_menue mainmenue();
tools.cpp:
Return_main_menue mainmenue()
{
// function which return Start, Credits or Help
}
I use the mainmenue() in my main.cpp:
Return_main_menue mainm = mainmenue();
But the compiler returns the error:
.../einbindung.h:7: error: multiple definition of 'enum Farbe'
.../einbindung.h:7: error: previous definition here
and so on for the other enums