There is no serialization library defined as part of the C++ standard. You will have to use a third party library (and requests for recommendations are off-topic for Stack Overflow), or you will have to write your own (and “how should I write a serialization library?” is probably “too broad”).
solved How can we serialize or deserialize the object of a class in c++.Is there any predefined library? [closed]