How do I read information from a certain line from a txt file in as a char, and then edit it.
This my code, but it doesn't work? Can someone please help as File IO is one of my weaker areas of C++..
Also can someone explain what the 100 after (buffer, is refering to?
int lines =;
cout << "Please Enter the line you would like to edit: ";
cin >> x;
cout << "Line " << x << " curently reads ";
ifstream afile (managerfile);
if(lines==x) cout << buffer;
else cout << "Line " << x << " does not exsist";
cout << "Replace with: ";
cin >> replacement;
ofstream bfile (managerfile, ios::app);
cout<<"Line Succesfully Edited";