mfin("strings.dat@iosbase::iniosbase::binary);\rif(!fin.is_open())\r(\rcerrP”Couldnotopenfileforinput.\n\rexit(EXITFAILURE);\r)\rGetStrs(fin,vistr);\rcout<<h\nHerearethestringsreadfromthefile:\nz;\rforeach(vistr.begin(),vistr.end(),ShowStr);\rreturn0;\r)\rvoidShowStr(conststd::string&s)\r(\rstd::coutPs<<std::endl;\r}\rvoidStore::operator()(conststd::string&s)\r(\rstd::size_tlen=s.size();\ros.write((char*)&len,sizeof(std::size_t));\ros.write(s.data(),len);\r}\rvoidGetStrs(std::istream&is,std::vector<std::string>&vs)\r(\rstd::stringtemp;\rsize_tlen;\rwhile(is.read((char*)&len,sizeof(size_t))&&len>0)\r(\rcharch;\rtemp=;EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rfor(intj=0;j<len;j++)\r(\rif(is.read(&ch,1))\r(\rtemp+=ch;\r)\relse\rbreak;\r)\rif(is)\rvs.pushback(temp);\r)\r)