Public Button::Listener not working

In plugineditor.h I have this:

class GainTutorial1AudioProcessorEditor : public AudioProcessorEditor,
public Slider::Listener,
public Button::Listener

I’m trying to add a toggle button to my UI and I need a listener for that, however this code doesn’t work. When I try to add another listener it just gives me errors. I’m pretty new to all of this.

Nevermind I wasn’t using the right function…

What do you mean it doesn’t work?

Did you add the virtual methods required for the Listener?


Where do I do that again?

Nevermind, I found what I was doing wrong, it was a dumb error.