I imagine it is this line that is giving you trouble:
infile.open("C:\Users\***\Desktop\School\chapter5.txt");
It's looking for a directory called "***" under C:\Users, which I imagine does not exist. I would replace *** with the user's name. Or it is possibly seeing the backslash as an escape character? Maybe try the forward slash ( / ) instead? Not sure, but I imagine it is looking for a folder called *** and not finding it.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711