Path.cpp
void Path::sendToFile(string filename){
  ofstream out;
  out.open(filename);

  if(!out.is_open()){
    cout << "Could not open file " << filename << endl;
  }else{
    for(int i=0; i<size(); i++){
      out << get(i).toString << endl;
    }
    out.close();
  }
}
/*
* Stores path in a text file
*/
Stores path in a text file
Stores path in a text file
void Path::sendToFile(string filename){
  ofstream out;
  out.open(filename);
  if(!out.is_open()){
    cout << "Could not open file " << filename << endl;
  }else{
    for(int i=0; i<size(); i++){
      out << get(i).toString << endl;
    }
    out.close();
  }
}
void Path :: sendToFile ( string filename ) { ofstream out ; out . open ( filename ) ; if ( ! out . is_open ( ) ) { cout << " " << filename << endl ; } else { for ( int i = 0 ; i < size ( ) ; i ++ ) { out << get ( i ) . toString << endl ; } out . close ( ) ; } }
Stores path in a text file
Stores path in a text file