Thanks for your reply.
But I have already tried all that.
Here is what I have done :
in onHttpRequestCompleted function,
cocos2d::extension::CCHttpResponse response = data;
std::vectorbuffer = response~~>getResponseData;
CCImage* img ;
cocos2d::CCTexture2D* texture ;
texture~~>initWithImage; //in this line I am getting exception
CCSprite* sprite = CCSprite::createWithTexture;
i have also tried like :
img->initWithImageData(buffer, 2841,CCImage::kFmtPng,160,160,8); but still not getting.
Please see if you can correct this.