C
cpptutor2000
Could some C/Unix guru please help me with an odd problem I am
having? I am using gcc on an embedded Linux device.
I have a function return a block of bytes and I want to copy them into
an empty file, all inside a function. For example, I would ideally
like to have something like following:
/*some function returns a pointer to a block of unsigned chars - this
part works fine
*/
sprintf(pBuff, "fopen file_name \"%s\"\n", "wb");
Now the question is how do I copy the block of bytes
obtained just above, to the file I have just opened?
Any hints or suggestion would be greatly appreciated - thank you in
advance for your help.
having? I am using gcc on an embedded Linux device.
I have a function return a block of bytes and I want to copy them into
an empty file, all inside a function. For example, I would ideally
like to have something like following:
/*some function returns a pointer to a block of unsigned chars - this
part works fine
*/
sprintf(pBuff, "fopen file_name \"%s\"\n", "wb");
Now the question is how do I copy the block of bytes
obtained just above, to the file I have just opened?
Any hints or suggestion would be greatly appreciated - thank you in
advance for your help.