you are defining the word IT as type which is of type list<string>::iterator which would be an iterator to a list of strings. NOT an iterator of a string in a list a string iterator looks like this
string::iterator
*edit
On a side note when I say you are defining it basically its like this
1 2 3 4 5
typedef list<string>::iterator IT;
IT apple; //apple is now of type - list<string>::iterator
//it is the same as this next line
list<string>::iterator apple;
You can also do it with other data types.
1 2 3
typedefint I;
typedefint a;
I am; a number;
*edit 2
The main use for typedef AFAIK is to minimize code
ex:
instead of calling something like this several times