I\'ve got a bit of a problem. Essentially, I need to store a large list of whitelisted entries inside my program, and I\'d like to include such a list directly -- I don\'t w
Let's assume you actually need to store a string >64k characters (i.e. all of the above "just don't do that" solutions don't apply.)
To make MSVC happy, instead of saying:
const char *foo = "abcd...";
You can convert your >64k character string to individual characters represented as integers:
const char foo[] = { 97, 98, 99, 100, ..., 0 };
Where each letter has been converted to its ascii equivalent (97 == 'a', etc.), and a NUL terminator has been added at the end.
MSVC2010 at least is happy with this.