Your char arrays need to be 8 characters long (bytes) to store the information read from the file. In fact you would do better to read the file and store one line at a time, so you would need to have another array of char to hold that value. Have a look at the cstring function strncpy.
I havenot tested this as have no compiler here at moment, but you should get the jest of whats happening. You should have test to ensure the file opens to read ok and also some way of ensuring the user inputs only the seven character course number.
cout<<"enter in course to search: ";
// reads line of text from file
// copies first 7 characters into input from line read
strncpy(input, lineread, 7);
// ensures null terminated
input = '\0';
// "\n" puts each result on one line