Following is my code: I am unable to reverse the string using reverse in file algorithm
#include<iostream>
#include<fstream>
#include<string>
#include<algorithm>
#include<iterator>
using namespace std;
int main()
{ 
 ifstream fp;
 string line;
 fp.open("list");
 if(!fp.is_open())
 {
  cerr<<"file not open";
 }
 while(!fp.eof())
{
  getline(fp,line);
  cout<<line<<end;
  std::reverse(line.begin(),line.end());    
} 
}
Compilation error I get is:
file.cpp: In function ‘int main()’:
file.cpp:21:15: error: ‘end’ was not declared in this scope
 
     
    