Currently, the point of program which I'll alter is doing this:
fwrite (buffer, size << 2, 1, file) != 1)
But, I cant write the file at program. I need send the informations to a host, by socket. So, the fwrite will be in host.
In the program, in the local which actually is the fwrite, I will put a command which will send the "message" to host.
The problem is:
My server socket is waiting a char[] and in this point of the program I have only the buffer. How can I convert the buffer to a char[] that I can send to my socket server?
I believe Albatross is correct in the above assertion. However, the buffer parameter of the fwrite is a void pointer to the address of a block of data. In order to better understand your problem, I'll need to know what type of information is contained in that block. For example, it makes a world of difference whether you're pointing to a string, a wstring, a wchar_t, etc...