Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. void List::ReadFromFile()
  2. {
  3. ifstream fin("TUR.txt");
  4. Vladelec *temp;
  5.  
  6. if (fin.is_open())
  7. {
  8. cout << "Файл открыт" << endl;
  9. while (!fin.eof())
  10. {
  11. temp = new Vladelec;
  12. fin >> temp->NameTUR >> temp->NameCountry>> temp->Duration >> temp->Stand >> temp->Thenumberofperm;
  13. temp->Next = Head;
  14. Head = temp;
  15. }
  16. cout << "Данные получены" << endl;
  17. fin.close();
  18. }
  19. else cout << "Файл не найден" << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement