sometimes when you copy code from a document it gets line numbers and strange quotes. I've written a script to remove those initial numbers but it is very hard to find a way to remove those strange quotes ‘’“” so I've included my full code. It reads in a file and puts out a formatted file. But the compiler warns that these quotes are multi characters, which I guess means non standard ascii chars. It kinda works but it's not a great solution. Any help appreciated:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
string replaceChar(string str, char ch1, char ch2);
// Main
int main(int argc, char *argv[]) {
    string line;
    fstream stri, stro;
    // ifstream in
    stri.open(argv[1], ios::in);
    if(stri.fail()){
        cerr << "File failed to open for input" << endl;
        return 1;
    }
    // ofstream out
    stro.open("file_out.txt", ios::out);
    if(stro.fail()){
        cerr << "File failed to open for output" << endl;
        return 1;
    }
    // Read - Write
    //stri.get(c);
    getline(stri, line, '\n');
    while(!stri.eof()){
        // Remove numbers
        line.erase(0,3);
        //line.replace( line.begin(), line.end(), "‘", "\'" );
        //line.replace( line.begin(), line.end(), "’", "\'" );
        //line.replace( line.begin(), line.end(), "“", "\'" );
        //line.replace( line.begin(), line.end(), "”", "\'" );
        line = replaceChar(line, '‘','\'');
        line = replaceChar(line, '’','\'');
        line = replaceChar(line, '“','\"');
        line = replaceChar(line, '”','\"');
        stro << line << endl;
        getline(stri, line, '\n');
    }
    // Close files
    stri.close();
    stro.close();
    // Output
    cout << "File Edited Ok!";
    //cout << count -1 << " characters copied."<< endl; 
}
string replaceChar(string str, char ch1, char ch2) {
  for (int i = 0; i < str.length(); ++i) {
    if (str[i] == ch1)
      str[i] = ch2;
  }
  return str;
}
 
     
    