- Code: Select all
int field[8][8]
in the global code area and give it a name like "startup", is THIS 2d int array then really global
and accessable by every actor in my game ??
int field[8][8]
int myVar[10][10]; //This will be global
void move(int amount)
{
x += amount;
}
void move(int amount)
{
int myVar[10][10]; //This will not be global, it will be the functions own variable
x += amount;
}
Users browsing this forum: No registered users and 1 guest