WriteInt
Write a set of Integer data into file
UINT WriteInt( void * pSrcBuffer, int nDataTypeSize, UINT nItemCount, BOOL bIsLittleEndian = TRUE )
The number of items write to file.
EX1
void file_WriteInt_ex1() { file ff("C:\\int.txt", file::modeCreate | file::modeWrite); vector<int> v(5); for ( int ii = 0; ii < v.GetSize(); ii++ ) v[ii] = ii; ff.WriteInt(v, sizeof(int), v.GetSize()); ff.Close(); file fr("C:\\int.txt", file::modeRead); vector<int> ve(5); fr.ReadInt(ve, sizeof(int), ve.GetSize()); fr.Close(); //v and ve should contains same data. }
file::ReadInt
origin.h