Skip to main content
gamedev.net
🔒 Locked

Structure

Started by Ethan 0 replies 250+ views
Original Post
Ethan
Ethan
How can i set the Structure global? can me help somebody? thx
Afterlife
Afterlife
hmm, structures as well as all other variables are global when they are defined outside a function (in most cases).
This example creates two global structures and two local structures :
  
typedef struct STR
{
int member;
}STR;
STR global1,global2;
int main()
{
STR local1,local2;
...
}

Easy as that. Hope I answered your question.
------------------------------If there be no heaven,may there atleast be a hell.-------------------------------Afterlife-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.