Hello. Faced a problem. Cannot split file.
void splitFile(string path) { int s = 0; char S[256]; int k = 10; string q[6] = {"a","b","c","d","e","f"}; int i = 0; ifstream in(path); while (!in.eof()) { fstream fout("xa" + q[i]); fout.seekg(0, ios_base::end); in.getline(S, 256); fout << S << "\n"; if (s = k) { s = 0; i++; } s++; fout.close(); } in.close(); } Tell me how to implement.