M
Matt
Hello,
I'm rather new to C++ and have a question about globals. What is the
big deal about them? They make things much easier to program because
you don't have to worry about all the passing back and forth between
functions. And, if you are going to give the reason about "it makes
it easier to debug your program if you don't use globals" well to that
I say, how so? Yes, not using globals prevents a random function
from setting values, but on functions where I am passing data back and
forth to the variable, I can still get into just as much trouble as if
it was defined globally... I guess I don't understand.... what's the
big deal about globals?
I'm rather new to C++ and have a question about globals. What is the
big deal about them? They make things much easier to program because
you don't have to worry about all the passing back and forth between
functions. And, if you are going to give the reason about "it makes
it easier to debug your program if you don't use globals" well to that
I say, how so? Yes, not using globals prevents a random function
from setting values, but on functions where I am passing data back and
forth to the variable, I can still get into just as much trouble as if
it was defined globally... I guess I don't understand.... what's the
big deal about globals?