When to choose global variable?
Posted: Wed Aug 18, 2004 2:16 am
Hello all,
Consider a linked list program. Which would be the best option to choose the "head" pointer? keeping it global and accessing over all the other functions or keeping it local and passing it to all the functions.
Thanks in advance.
Consider a linked list program. Which would be the best option to choose the "head" pointer? keeping it global and accessing over all the other functions or keeping it local and passing it to all the functions.
Thanks in advance.