There was a need to rewrite the project on STL. In the old version there was such a read into the array int from a binary file:
for (unsigned i = 0; i < n; i++) in.read(reinterpret_cast<char*> (&ia[i]), sizeof(int)); Tried to rewrite as follows:
std::ifstream ifs(nameFile, std::ios::binary); std::istream_iterator<int> ii(ifs); std::copy(ii, std::istream_iterator<int>(), ia.begin()); Vector ia remains empty. Search in Google did not give any results, for some reason all the examples do not work. Please help me (ps memory for the vector is allocated).