It was a mistake from my part regarding the above article. Thanks for pointing out that. I have corrected it so that it should read what its intended to.

The sample was correct as far as implmentation goes but I put the wrong code snippet you need to put in main.cpp file and I have corrected that.