I can't see anything intrinsically wrong with the code you've posted... could you post the code in context as well as copy the full compiler error message?