I’m programming a simple game. There is a structure I created called “scene”. Within the game structure (another structure I created to represent the game state), I call this line of code:
scene_container[0].image = " ";
I can’t figure out why this can’t work. Can I even create an array of structures like so:
struct scene scene_container[10];
When I run the code, this error occurs :
IOS Forbids Declaration of ‘scene-container’ with no type.
You’ve prefixed your array reference with a type making it declaration. There is a limit to what you can initialize in declaration (nothing in this case).