Usage looks OK. What compiler are you using? Is it one that doesn't support the "explicit" keyword?