I got error "C2280: attempting to reference a deleted function" compiling error when doing following code:
std::ofstream ofs(m_headerFileName, std::ios::binary, std::ios_base::app);
m_ofsHeader.push_back(ofs);
where
std::vector<std::ofstream> m_ofsHeader;
I don't understand why I cannot push a ofstream
instance into an ofstream
vector
. Someone gives some hint? Thanks. I am on Windows 7 and Visual Studio 2015.
Also, what is the walkaround here if there is any?
I am trying to keep a bunch of ifstream/ofstream with each one having their own file to read/write.