a question for help about "How to Add a sprite"

I’m new to cocos2dx and CPP. I’m flowing the tutorials to study cocos2dx. In the Chapter 2 “How to Add a sprite”, I change CCLayer to CCLayerColor, but CREATE_FUNC(HelloWorld) show the error The type ‘HelloWorld’ must implement the inherited pure virtual method ‘cocos2d::CCRGBAProtocol::setOpacity’, i can’t find any help in google.com and baidu.com.
How can i do?
Thx

can you post what you are doing?

dont use the (Hello World .h or .cpp)

create a new CCScene or CCLayer class

thx