Hi,
I have a text file as a custom resource in my project, i need to read the whole file into a char. I have no idea how to do this, does anyone know?
Thanks
TNT
Hi,
I have a text file as a custom resource in my project, i need to read the whole file into a char. I have no idea how to do this, does anyone know?
Thanks
TNT
TNT
You Can Stop Me, But You Cant Stop Us All
The example I gave in the following link shows how to access a resource at runtime and gain a pointer to it's data - here
I think this is what you are refering to....but I dont fully understand your question
Hey,
Im not 100% sure that was what i needed but i may be wrong, sorry i didnt make my question clearer.
I have a .txt file as a custom resource in my project. I need to read this text file in to a char array. Basically rather than reading a file from the hdd into a string, i need to read it from my programs resources into a string.
Sorry if i am wrong and that link you gave me is the correct info.
Thanks again,
TNT
TNT
You Can Stop Me, But You Cant Stop Us All
Its almost the right info......all I do there is search for a resource in my exe.......load it....then lock it....this lock gives a pointer to the data inside the resource..........also notice I use SizeofResource() to tell me how much data to read from that resource......
So you have;
[list=1][*]A pointer to the data[*]A variable with the amount of data to read[/list=1]
That's all you will need as far as I can see......from that info, copying the data to an array should be child's play