But if i already have the list of classes in a file is there a way i can compare the descriptions of the classes by reading that file from the program?
Sure, you can compare the search key entered by the user to values contained in the file, but you have to read them in from the file and store them somewhere useful for the program. The values have to be somewhere that the program can get at them to compare the values, and the class/struct I described above is a fairly clean and straightforward way of doing that.
What all information is contained in your list of classes file? Is it just the class name, or is there other information about the class as well, like categories (e.g. you have classes named biology and chemistry, both might have a category of science). If that kind of information is present, it should be a pretty simple comparison from the search category to the class category. If not, you will need to have a pretty exhaustive comparison function hard-coded in that takes the search key entered by the user and compares it to some finite set of possible class names that might match.