Hi again!
So here's what im trying to do this time:
1.Open a file.
2.Capitalize the first letter of every line.
3.Put it in another file.
I got stuck with the third part. It capitalize every word on the console but not in the
created file.
I hope i dont abuse your patience. Tx.Code:#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream TheFile("f2.txt");
ofstream TheCopy;
TheCopy.open ("YourCopy.txt",ios::app);
string ch;
while (getline(TheFile,ch))
{
cout.put((int toupper(ch)));
else cout.put(ch);
TheCopy << ch;
}
TheCopy.close();
TheFile.close();
cout << endl;
system("pause");
}