I made a game for Windows with Visual Studio. Everything works fine. And than i decided to make same game for android. But i have an error on Android Studio. I used “for each” in one class. It was work on visual studio but android studio gives error.
This non-standard keyword is available in both C++/CLI and native C++ projects. However, its use is not recommended. Consider using a standard Range-based for Statement (C++) instead.
That’s the reason it won’t work outside the Microsoft ecosystem.
So how can i solve this problem? Is there anything else I can use instead of “foreach”? Or do I have the chance to make the android version of my game on visual studio or visual studio code?
Spending some time brushing up on C++11 would help, but aside from that, did you actually click any of the links in my previous post? You would have eventually found yourself here: Range-based for Statement (C++). The solution is literally there, which is exactly what everyone who’s replied to this thread has pointed out to you.