Problem to pass Touch event to other object

Let me describe my program:

I have a CBook object which includes a few CPage object. When touch event triggered in CPage object, I want to pass it to CBook object. But the program crash then. Here is my source code:

// page.h class IPageTurnCallbackInterface { public: virtual void onGotoNextPage() = 0; virtual void onGotoPreviousPage() = 0; };

class CPage : public cocos2d::CCScene
{

public:
CPage(IPageTurnCallbackInterface* pCallback);

// lazy load
void load(const std::string& name);

private:
IPageTurnCallbackInterface* m_pCallback;
};

class CPageLayer : public cocos2d::CCLayer
{
public:
CPageLayer(const std::string& name,IPageTurnCallbackInterface* pCallback);

private:
cocos2d::CGPoint m_firstLocation;
IPageTurnCallbackInterface* m_pCallback;

virtual bool ccTouchBegan(cocos2d::CCTouch* touch, cocos2d::UIEvent* event);
virtual void ccTouchEnded(cocos2d::CCTouch* touch, cocos2d::UIEvent* event);

};

// page.cpp
using namespace cocos2d;

CPage::CPage(IPageTurnCallbackInterface* pCallback)
: m_pCallback(pCallback)
{
CCScene::init();
}

void CPage::load(const std::string& name)
{
CPageLayer* layer = new CPageLayer(name,m_pCallback);
addChild(layer);
layer~~>release;
}
CPageLayer::CPageLayer
: m_pCallback
{
CCTouchDispatcher::sharedDispatcher~~>addTargetedDelegate;
CCSprite* pSprite = CCSprite::spriteWithFile);
// ask director the window size
CGSize size = CCDirector::sharedDirector~~>getWinSize;
// position the sprite on the center of the screen
pSprite~~>setPosition );
// add the sprite as a child to this layer
this~~>addChild;
}
bool CPageLayer::ccTouchBegan
{
m_firstLocation = touch~~>locationInView( touch~~>view );
m_firstLocation = CCDirector::sharedDirector~~>convertToGL;
return true;
}
void CPageLayer::ccTouchEnded
{
CGPoint location = touch~~>locationInView );
location = CCDirector::sharedDirector~~>convertToGL;
if
{
m_pCallback~~>onGotoNextPage;
}
else if
{
m_pCallback~~>onGotoPreviousPage();
}
}

// book.h
class CBook : public IPageTurnCallbackInterface
{
public:
CBook(const std::string& name);

void gotoFirstPage();
void gotoNextPage();
void gotoPreviousPage();

private:
std::vectorstd::string m_pages;
unsigned int m_uiCurrentPageNo;

void turnPage();
cocos2d::CCScene* currentPage();

void onGotoNextPage();
void onGotoPreviousPage();

};

// book.cpp
using namespace cocos2d;

CBook::CBook(const std::string& name)
{
// TODO: to deal with book name later

m_uiCurrentPageNo = 0;
m_pages.clear();

// TODO: hard code here
//#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
// if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
// m_pages.push_back(“page1-ipad.jpg”);
// m_pages.push_back(“page2-ipad.jpg”);
// } else {
// m_pages.push_back(“page1.jpg”);
// m_pages.push_back(“page2.jpg”);
// }
//#endif

m_pages.push_back(“page1.jpg”);
m_pages.push_back(“page2.jpg”);

}

void CBook::turnPage()
{
CCScene* scene = this~~>currentPage;
if
CCDirector::sharedDirector~~>replaceScene;
}
void CBook::gotoFirstPage
{
m_uiCurrentPageNo = 0;
turnPage;
}
void CBook::gotoNextPage
{
if~~ 1 )
m_uiCurrentPageNo++;
turnPage;
}
void CBook::gotoPreviousPage
{
if
m_uiCurrentPageNo—;
turnPage;
}
CCScene* CBook::currentPage
{
CPage* scene = NULL;
if )
{
std::string pageNo = m_pages[m_uiCurrentPageNo];
scene = new CPage;
scene~~>load(pageNo);
}

return scene;
}

void CBook::onGotoNextPage()
{
}

void CBook::onGotoPreviousPage()
{
}

Anybody has any idea why the program crash?

Thanks