#define dItemName L\"CellPhone\"
#define
is a preprocessor instruction that defines a macro. In your case macro dItemName
with value L"CellPhone"
.
Macros are bad mostly because they are processed before the actual code is. This means that they aren't subjected to scopes and to the rules of C++ syntax. If you've got a variable somewhere called dItemName
, things won't probably work: you'll get hard-to-understand compilation errors due to that.
The solution is to declare dItemName
as a variable (in this case a const
variable).