I'm confused about lines 57 to 59. Why are u changing the backslashes?
For fstream to open a file it has to be of the format: selectedFile.open("C:\\USERS\\PROJECTS\\myproject.txt"); //the caps don't matter
szFile has no member size() because it's just a char. U already know the length of it to be 260 from line 19