How do I use the data from a cmrc::resource?
Tetrago opened this issue · 4 comments
Tetrago commented
I tried to use:
cmrc::resource file = cmrc::open(file); std::string data(file.begin(), file.end());
But there is no string constructor like this. How do I use CMakeRC?
Tetrago commented
Actually, I can't even get CMakeRC to run, it errors out.
vector-of-bool commented
Sorry for the delay. Were you able to work out a solution?
izzyreal commented
I do
auto file = fs.open("some_resource_file.txt")
auto it = file.begin();
vector<char> bytes;
do bytes.push_back(*it);
while (it++ != file.end());