(C++) Initialize string with HUGE amount of text, not from txt -
i have quick question think has quick answer. have string variable , need filled predetermined characters. problem is, have lot put in it. how can fill string text without having huge ("lotsandlotsoftext"); when declare it? don't want in separate text file.
thanks :)
use string resource load std::string.
1) add string resource editor: how add string resource in visual studio 2008
2) use loadstring
3) use loadedstring parameter constructor
tchar buf[<yourverylongstringlength>]; loadstring(hinst, ids_yourstringresource, buf, sizeof(buf)/sizeof(tchar)); const std::string yourcplusplusstring = buf;
Comments
Post a Comment