Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- setlocale(LC_ALL, "ru");
- worker demo("вован", 1, 2, 3, 4, 5, 6);
- string path = "C:\\Users\\Max\\Desktop\\JAVAFILE.txt";
- ofstream fout;
- fout.open(path, ios_base::trunc);
- fout.write((char*)&demo, sizeof(worker));
- fout.close();
- worker buf;
- ifstream fin;
- fin.open(path);
- while (fin.read((char*)&buf, sizeof(worker)))
- {
- cout << buf.name << " " << buf.detailsOnMonday << " " << buf.detailsInTuesday << " " << buf.detailsInWednesday << " " << buf.detailsInThursday << " " << buf.detailsOnFriday << " " << buf.detailsOnSaturday << endl;
- }
- fin.close();
- //showMenu();
- }
Advertisement
Add Comment
Please, Sign In to add comment