forked from natto1784/ooplab
27 lines
361 B
C++
27 lines
361 B
C++
#include <fstream>
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
const string FILE_PATH = "./28.in";
|
|
|
|
int main() {
|
|
string line;
|
|
|
|
fstream file;
|
|
file.open(FILE_PATH, ios_base::in);
|
|
|
|
if (!file.is_open())
|
|
exit(1);
|
|
|
|
while (getline(file, line)) {
|
|
cout << line;
|
|
if (file.peek() != EOF) {
|
|
cout << endl;
|
|
}
|
|
}
|
|
|
|
file.close();
|
|
|
|
return 0;
|
|
}
|