Is it better to use static const vars than #define preprocessor? Or maybe it depends on the context?
static const
#define
What are advantages/disadvantages for
Defining constants by using preprocessor directive #define is not recommended to apply not only in C++, but also in C. These constants will not have the type. Even in C was proposed to use const for constants.
C++
C
const