[Noob Help] Animation question/help

I am seasoned in programming .net but new to c++ i have a very good understanding so far and i am trying to follow the spritesheet animation tutorial and it just doesnt work. below is the code used straight from the tutorial:
bool character::animate(){

	SpriteBatchNode* spritebatch = SpriteBatchNode::create("animations/grossini.png");
	SpriteFrameCache* cache = SpriteFrameCache::getInstance();
	cache->addSpriteFramesWithFile("animations/grossini.plist");
	Sprite* Sprite1 = Sprite::createWithSpriteFrameName("grossini_dance_01.png");
	spritebatch->addChild(Sprite1);
	addChild(spritebatch);
	Vector<SpriteFrame*> animFrames(15);

	char str[100] = { 0 };
	for (int i = 1; i < 15; i++)
	{
		sprintf(str, "grossini_dance_%02d.png", i);
		SpriteFrame* frame = cache->getSpriteFrameByName(str);
		animFrames->addObject(frame);
	}
	Animation* animation = Animation::createWithSpriteFrames(animFrames, 0.3f);
	Sprite1->runAction(RepeatForever::create(Animate::create(animation)));
}

Obviously i will change the filenames and sprites however i cant even get it to compile i get an "error C2819: type ‘cocos2d::Vector<cocos2d::SpriteFrame *>’ does not have an overloaded member ‘operator ->’ on this line “animFrames->addObject(frame);” and i dont understand why…I am sure this is a simple issue…something i overlooked maybe…but being so new to the whole language has me at a disadvantage. Thank you for any help or advice that can be given.

animFrames is an object (and not a pointer) so you must use . for calling addObject method:

animFrames.addObject(frame);
1 Like

I did try that there was no addobject or anything that looks like but with your verification it was switching from -> to . i decided to look into the migrating docs and found that ->addObject was replaced with .pushback

Thank you!

ref : http://www.redtgames.com/blog/cocos2d-x-v2-to-v3-mapping-guide/