Here is my code where I try to Append to a file and also read it.
Appending is working great however reading is not working.
Is it the problem of getline?

```
#include <fstream>
#include <string>

using namespace std;

int main()
{
   fstream ob1;
   ob1.open("testext", ios::app | ios::in);

   ob1 << "1\n";
   ob1.write("Write\n", 5);

   while (ob1)
   {
       cout << "1" << endl; // Check if compiler goes in while loop
       string a;
       getline(ob1, a);
       cout << a << endl;
   }
   ob1.close();
}

```

Output

```
1

```