Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- ofstream oFile("text.txt");
- oFile << 3 << endl << "f(15)" << endl << "min(f(15), 24)" << endl << "f(min(25, g(14)))";
- oFile.close();
- ifstream myReadFile;
- myReadFile.open("text.txt");
- if (!myReadFile.is_open()) {
- cerr << "not opened";
- }
- vector<string> a;
- int n;
- myReadFile >> n;
- myReadFile.get();
- for (int i = 0; i < n; i++) {
- string sentence;
- getline(myReadFile, sentence);
- a[i] = sentence;
- }
- myReadFile.close();
- for (int i = 0; i < n; i++) {
- cout << a[i] << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement