i did this to my global variables to try and get rid of them, but now there undefined to my entire program, even though they are public, did i do this right, and how do i solve this problem?
While it is true that they are public, now they only belong to objects of the VariableStorage class. Is there a specific reason that you want to get rid of your global variables, or is it just a matter of preference?
You are declaring all those variables inside the constructor instead of inside the class.
Declare them outside the constructor and initialize them inside it. Also if, you are not going to have public getter methods to return the private data just use a struct instead of a class because it defaults to public.
Looking at all those variables makes me wonder if you should just organize them into several separate classes. It would make things much more intuitive and manageable.