answered Aug 21 '14
no, those are not mistakes or bugs. it's a version mismatch.
above code is for opencv3.0, you're probably running 2.4.9