#include <string> #include <fstream> #include <iostream> using std::string; using namespace std; int main(){ string path="c:/perlprg/test.txt"; fstream infile; infile.open(path.c_str(),ios::out); string line; while(std::getline(infile,line,'/n')){ std::cout<<line<<"/n"; } } path.c_str();