I am using some constants defined in
Constanst.h
#ifndef __CONSTANTS_H__
#define __CONSTANTS_H__
namespace A{
namespace B{
const int FIRST = 1;
const int SECOND = 2;
}
}
#endif
I am including this file from 2 different .cpp (A.cpp and B.cpp)
gcc version 3.2.3 is giving me "multiple definition" linking errors
I solve the problem only by including another "File.h" which includes "Constants.h" and declares the same constants as "extern"
Can someone explain why? I supposed this was an issue in C, not C++