Did you copy&paste this code from someplace, or did you install the IRremote library and find this code in the Arduino Examples directory? I suspect it was copy&paste because this error wouldn't have come from a sketch in the example folder.
So, if you copy&paste the code from somewhere, you actually grabbed too much. You got some extra characters either at the beginning of the code or most likely at the end. HTML uses invisible characters to control formatting.
The code you've posted here reportedly works without problem, but you copy&pasted the code to post it here, so you may not have happened to include this invisible character, so testing the code you posted doesn't prove anything.
So, the options are:
o Install the IRremote library, and use examples out of the Arduino example folder.
o Start absolutely fresh with a new blank sketch and copy the file again, being certain to only copy from the first letter to the last without any extra blank space or any other characters.
I have used Arduino enough to know it's a major pain in the butt compared to Swordfish. There are many levels of complexity, starting with the need to install libraries. Proper formatting of the code has been really confusing to me.