0

I have searched everywhere but did not find any way to write and the read dynamic_bitset to/from file. How to make readFromFile() and writeToFile() functions for reading/writing desired bits?

  • Does this answer your question? [How to serialize boost::dynamic\_bitset?](https://stackoverflow.com/questions/31006792/how-to-serialize-boostdynamic-bitset) – Hasturkun Jan 14 '21 at 12:19
  • @Hasturkun I don't see any file names being passed to load and save. Why is that? – Muhammad Iqbal Jan 14 '21 at 13:32
  • Because they don't have to. If you follow that, using boost serialization you can e.g. connect it to an ofstream (since it supports istream/ostream). Alternately, you can use that as an example without boost serialization, and implement the reading/writing based on the vector of blocks yourself. – Hasturkun Jan 14 '21 at 14:30

0 Answers0