I’m writing a c++ application which does lots of string parsing. I keep my string definitions in a normal header file (there is no corresponding C++ file).
The header file uses #ifdef XXX to ensure its processed by the compiler only once.
I have the option of declaring the strings either
const TCHAR m_szRoot[] = _T("root");
or
static const TCHAR m_szRoot[] = _T("root");
Theses variable are used numerous times in the application.
What’s the recommended declaration? and which declaration is better from an application size perspective.