You create a local object, attach it to a pin, and then a few hundred nanoseconds later, it goes out of scope and is useless. Later, in PushButton, you create another object of the same name, don't attach it, but still write to it.
I have no idea how to restructure your code either because you didn't post any.
I have a rule of thumb - if something sounds like it is the wrong thing to do, it probably is the wrong thing to do. About the only time I've ever had to fiddle with stack pointers is for machine monitors and single step debuggers.
yes didnt you see where i posted i know im not using arrays but im getting things to work first and im at the same time teaching a friend basics of using an arduino
If you're trying to teach someone else how to program, then it is best to concentrate on how to program the problem for a single entity. After that, additional similar entities are relatively trivial by making entity references into arrays. Confusing someone with masses of unused declarations is just likely to be counter-productive.