I've read a lot for this problem ,but I haven't found a proper solution. So i have 4 files:
includes.h - which contains all libraries I need in other files + some global functions
cities.h - which contains declarations of 2 classes
cities.cpp - which contains definitions of the 2 classes in cities.h
source.cpp - where is the main functon
And I have(and need) these includes
//cities.h
#include "includes.h"
//cities.cpp
#include "cities.h"
//source.cpp
#include "cities.h"
I've tried almost all combinations of #ifndef
in all of the files and the program continues to give me the same error: function_X already declared in cities.obj
.And this error repeats for all functions in "includes.h".
Please help me.This makes me a lot of headaches.