How to use class-specific variables in a function?

That seems like you want a struct where you can have controller1.button1, controller1.button2, controller1.button3 etc
that should be a relatively simple c code thing however I only looked it up once and don't know the specifics of making a variable like that,
looking up struct on google should get you started atleast