~GaLs~
† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
- Reaction score
- 180
As vexorian said in post. Globals are static while structs are dynamic.Ignore Cohadar's link, it is totally unrelated to your question.
Your question is quite lame, it is mostly like "why not use a fork instead of using a knife"? You are kind of making a false dichotomy as if globals and structs were meant to solve the same problem, when they are meant to solve different problems.
globals: static , structs : dynamic. There is huge difference.
You could use a global array and some pointer like value and some pseudo allocation/deallocation but then, you would be doing exactly what structs do already.
In short, your post seems to come from a huge misunderstanding on what structs are. Please post some of your code in which you "replace structs with globals" .
I would like some explain of static and dynamic.
Don't, again tell me to read the manual. It has nothing to do with this.