How would I remove the first character from each line of a file?
I put each line into temp and try to change the first character but it tells me that I can't convert from "const char" to "char".
Code:#include <iostream> #include <fstream> using namespace std; int main(void) { ifstream file; ofstream out; file.open("first.txt"); out.open("temp.txt"); string temp; while(file.good()) { getline(file, temp); temp[0] = ""; //doesn't work out << temp << endl; } out.close(); file.close(); cin.get(); return 0; }