Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Tablica::loadValues() {
- fstream file;
- file.open(FILE_NAME);
- int val, size_2;
- if(file.is_open()) {
- file >> size_2;
- if(file.fail())
- cout << "File error - READ SIZE" << endl;
- else {
- for(int i = 0; i < size_2; i++) {
- file >> val;
- if(file.fail()) {
- cout << "File error - READ DATA" << endl;
- break;
- } else
- addValue(11, val);
- }
- file.close();
- }
- } else
- cout << "File error - OPEN" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement