Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- class File {
- private:
- ifstream data_file;
- int *a;
- public:
- File(const char *filename) {
- a = new int[15];
- /* data_file.open(filename);
- if (!data_file.is_open()) {
- throw ("file open failed");
- }*/
- }
- ~File() {
- data_file.close();
- //delete[] a;
- }
- };
- int main() {
- File file("wrong_filename");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement