Home > Software engineering >  Cfile write file data, once the most how much data can be written?
Cfile write file data, once the most how much data can be written?

Time:09-29

 
The vector & lt; char> Cs_writ;//data containers
Char cs_write [7686]=""


If (cs_writ. The size () & gt;
=7686){
for(int i=0; I<7686; I++)
Cs_write [I]=cs_writ [I];
}
The else
{
for(int i=0; ICs_write [I]=cs_writ [I];
}
File. The Write (cs_write, 7686);//rewrite 7686 data
Vector (). Swap (cs_writ);//empty container

File. The Write (& amp; Timedata_show, 4);
Unsigned short long_data=https://bbs.csdn.net/topics/0x1E06;
File. The Write (& amp; Long_data, 2);

I was meant to, no matter how much we received data, I can only write 7686 data, so the use of the container, the received data into the container first, and then take before 7686 to array, less than 7686 will give array, the number of all the last time not enough use, ensure inventory data format, please write in the great spirit show cfile a most how much data can be written? Sometimes appear in this file. Write (cs_write, 7686) is not complete, occasional 7686 didn't Write the whole array; Every time do hardware acquisition and processing the data is too much trouble,
  • Related