
13 Jan
2011
13 Jan
'11
9:34 p.m.
Now I need to upload some large fails, and tried this:
tcp::iostream net_stream(SERVER_ADDR, "12345"); // send file name net_stream << IN_FILE << "\n"; // send tags data size net_stream << count << "\n"; // copy tags data net_stream.write((char *)data, count); <<== app crashes here
If it crashes, then most likely the "data" buffer is smaller than count. What is "data", how do you allocate it?