cannot override ccTouchesEnded because its final. [Error]

Hi, i am following this tutorial with 3.0 alpha http://www.cocos2d-x.org/wiki/Chapter_4*-*How_to_Fire_some_Bullets?project_id=cocos2d-x#Chapter-4-How-to-Fire-some-Bullets

It tells me to declare and implement void ccTouchesEnded(…) but the function is set as final in cocos2d-x so i cant. What do :C ?

error C3248: ‘cocos2d::Layer::ccTouchesEnded’: function declared as ‘final’ cannot be overridden by ‘GameScene::ccTouchesEnded’

Hi Tomáš Beňo,
All the tutorials or chpaters you follow, will work fine with current stable version 2.2.0.
Cocos2d-x 3.0 is still under alpha version, and might be due to this reason, the tutorial is not updated.

in 3.0, cc or CC prefixes have been removed making those methods deprecated which were not in 2.2.0 .
So for ‘ccTouchesEnded’, you can use ‘onTouchesEnded’.

I did that but looks like the function never gets called, i placed a breakpoint to make sure, i did only the stuff in the tutorial, do i need something more? And is this a good way of getting input on a windows only game?

Not sure if you have this issue still, or if anyone else does that might find this. but the tutorial says to declare the method:(in HelloWorldScene.h)

As @buntynara said, in version 3, onTouchesEnded is the proper method to use.
In order for this function to be called, the method must be defined as follows:

I am unsure if this is the best/correct way for this to be declared, all I know is that when I went through the Cocos tutorials, this worked for me.