src/ccutil/serialis.cpp
bool SaveDataToFile(const std::vector<char> &data, const char *filename) {
  FILE *fp = fopen(filename, "wb");
  if (fp == nullptr) {
    return false;
  }
  bool result = fwrite(&data[0], 1, data.size(), fp) == data.size();
  fclose(fp);
  return result;
}
// The default FileWriter writes the vector of char to the filename file,
// returning false on error.
The default FileWriter writes the vector of char to the filename file,
returning false on error.
The default FileWriter writes the vector of char to the filename file returning false on error .
bool SaveDataToFile(const std::vector<char> &data, const char *filename) {
  FILE *fp = fopen(filename, "wb");
  if (fp == nullptr) {
    return false;
  }
  bool result = fwrite(&data[0], 1, data.size(), fp) == data.size();
  fclose(fp);
  return result;
}
bool SaveDataToFile ( const std :: vector < char > & data , const char * filename ) { FILE * fp = fopen ( filename , " " ) ; if ( fp == nullptr ) { return false ; } bool result = fwrite ( & data [ 0 ] , 1 , data . size ( ) , fp ) == data . size ( ) ; fclose ( fp ) ; return result ; }
The default FileWriter writes the vector of char to the filename file,
returning false on error.
The default FileWriter writes the vector of char to the filename file returning false on error .