Hi

I've got a program that reads a list from a text file. When the program reads the file, it displays all the items and allows you to search through it.

The problem I'm having is that when I search through it, the case of the letters effects the results. I tried using the tolower function to make the case of the stored and input words all lower case but it says I am not allowed to convert char to int. I didn't think it was converting to int seeing as I am searching for words.

The part that is giving me problems is:

Code:
	while(in_file == NULL);
    	while (fscanf ( in_file,"%d%s%s%d%f",
			&slist[i].stocknumber,
			slist [i].description,
			slist [i].supplier,
			&slist[i].quantity,
			&slist[i].price) != EOF) i++;
	fclose (in_file);
I've got the <cctype> header, and i is defined as an integer. So when I do something like, tolower(slist[i].description], it says invalid conversion from char to int.

I don't know have I pasted enough code or even the right bit, but its basicly that and any advice would help.

I'm trying to change all the letters stored under something like description to be altered into lowercase so it can be searched for regardless of the capital letters (the input from search will be turned into lower case too.)