Because the compiler has no way to tell whether 'f' can or cannot possibly refer to an object of class CClass. And as there is an explicit cast, it believes the coder that the object refered to by 'f' 'may' actually refer to an object of class CCLass.
The point here is, if a compiler can figure out that some thing is just not possible in any case then it generates an error. For eg. had 'f' been of class CFace instead of interface Face, it would know that f can NEVER point to an object of class CClass as there is no relation between them ( none is a sub/super class of the other). So it would generate an error.
But as f is of interface Face, it just can't figure out whether
it can/cannot point to an object of class CClass. So it passes it. It will fail at run time though!
HTH,
Paul.
------------------
http://pages.about.com/jqplus Get Certified, Guaranteed!