Original Post
Does each case in a switch have its own scope? As in, could I declare a variable under a case xx: and have it limited to only that case, or at least inside the switch? Basically, I have a function that is called recursively that won''t need the variable for every instance. I''m sure having it there won''t hurt much, but I''d like to avoid it if it is possible. Why waste the memory?
If it doesn''t have its own scope is generally bad practice to declare variables further down into the code?
Thanks,
Kenneth