Reading and writing a std::vector into a file correctly

后端 未结 5 1226
梦毁少年i
梦毁少年i 2020-12-01 04:26

That is the point. How to write and read binary files with std::vector inside them?

I was thinking something like:

//============ WRITING A VECTOR IN         


        
5条回答
  •  自闭症患者
    2020-12-01 05:11

    You can use

    #include 
    

    to serialize your vector. Read a tutorial here: http://www.boost.org/libs/serialization/doc/tutorial.html#stl `

提交回复
热议问题