Looks like your code have more than 1 problem:
This should be better:
input.open("Data.CS.SFSU"); if (!input) { cout << "File not opened!";
exit(1);
}
input.open("Data.CS.SFSU");
Advice: Learn to indent properly your code, it show its structure and it helps reading and understanding. It also helps spotting structures mistakes.
Indentation style - Wikipedia[
^]
Professional programmer's editors have this feature and others ones such as parenthesis matching and syntax highlighting.
Notepad++ Home[
^]
ultraedit[
^]