"Xzyx987X" <Xz******@mn.rr.com> wrote
I wanted to do something like this: const char reg_defaultKey[30] =
{REG_DEFPATH, "\\" , VERSION};
What is the proper syntax? The above was just my best guess but it didn't
work and I couldn't find any info on the correct way anywhere else.
#define REGPATH "C:\\MyRegistryPath"
#define VERSION "1.0"
const char reg_defaultKey[30] = REGPATH "\\" VERSION;
The strings concatenate, so "hello " "world" is the equivalent to "Hello
World".
If VERSION is a number rather than a string, you need to use the
"stringizer", which is a #, to convert the number into a string.