How do I include extremely long literals in C++ source?
- by BillyONeal
Hello everyone :)
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 want to have to distribute other libraries and such, and I don't want to embed the strings into a Win32 resource, for a bunch of reasons I don't want to go into right now.
I simply included my big whitelist in my .cpp file, and was presented with this error:
1>ServicesWhitelist.cpp(2807): fatal error C1091: compiler limit: string exceeds 65535 bytes in length
The string itself is about twice this allowed limit by VC++. What's the best way to include such a large literal in a program?