visual studio 2012 - cocos2dx c++ looping through cocos2d::Vector -


hi kind of new c++ , cocos2dx. trying following:

//mainscene.cpp vector<string> frames; frames.pushback("ground"); frames.pushback("sky_bg");  each (string sprite_name in frames) {  } 

this gives following error in vs2012

a 'for each' statement cannot operate on expression of type "cocos2d::vector

so how should going this?

correct way use :

for (const string& sprite_name : frames) {     // code } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -