diff options
Diffstat (limited to 'lab8.txt')
| -rw-r--r-- | lab8.txt | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -15,6 +15,30 @@ p 317 4 pts #5-6 Submit: Statements for 5, Judgements for 6 +5. + a.) .is_open() + b.) + + int num_data = 0; + + //open file + ifstream input ("lab8.txt"); + + // check open file + if (input.is_open()) + { + // priming + input >> lname[num_data] >> id[num_data] >> age[num_data]; + } + else + cout << "File not opened" << endl; + return 0; + + c.) + for the above ^^ + input.close() + + ================================================================================================ |