1

Hey guys this is my code and i am relatively new to C++ and even coding really dont know why i am getting a parse error though i as per my understanding i have placed the parenthesis properly anyone please suggest if i am missing anything here.

i am getting error at this line

class getProcessor()->RequestUIUpdate()// UI update must be done each time a new editor is constructed

Full Code:

StereoWidthCtrlAudioProcessorEditor::StereoWidthCtrlAudioProcessorEditor (StereoWidthCtrlAudioProcessor* ownerFilter)
    : AudioProcessorEditor(ownerFilter)
{
    addAndMakeVisible (WidthCtrlSld = new Slider ("Width Factor Slider"));
    WidthCtrlSld->setRange (0, 5, 0.1);
    WidthCtrlSld->setSliderStyle (Slider::LinearHorizontal);
    WidthCtrlSld->setTextBoxStyle (Slider::TextBoxLeft, false, 80, 20);
    WidthCtrlSld->addListener (this);

    addAndMakeVisible (BypassBtn = new TextButton ("Bypass Button"));
    BypassBtn->setButtonText (TRANS("Bypass"));
    BypassBtn->addListener (this);

    addAndMakeVisible (label = new Label ("new label",
                                          TRANS("Stereo Width Factor:")));
    label->setFont (Font (15.00f, Font::plain));
    label->setJustificationType (Justification::centredLeft);
    label->setEditable (false, false, false);
    label->setColour (Label::textColourId, Colour (0xffa34747));
    label->setColour (TextEditor::textColourId, Colours::black);
    label->setColour (TextEditor::backgroundColourId, Colour (0x00000000));


    //[UserPreSize]
    //[/UserPreSize]

    setSize (600, 400);


    //[Constructor] You can add your own custom stuff here..

    class getProcessor()->RequestUIUpdate()// UI update must be done each time a new editor is constructed

    startTimer(200)//starts timer with interval of 200mS
    BypassBtn->setClickingTogglesState(true);
    //[/Constructor]
}

StereoWidthCtrlAudioProcessorEditor::~StereoWidthCtrlAudioProcessorEditor()
{
    //[Destructor_pre]. You can add your own custom destruction code here..
    //[/Destructor_pre]

    WidthCtrlSld = nullptr;
    BypassBtn = nullptr;
    label = nullptr;


    //[Destructor]. You can add your own custom destruction code here..
    //[/Destructor]enter code here
}
Filip Roséen - refp
  • 62,493
  • 20
  • 150
  • 196
Vinayak
  • 13
  • 3
  • `class` is a keyword to define a class, or at least declare the existence of a class -- neither of which are being done in your code. You might mean that line to look like `getProcessor()->RequestUIUpdate();` but you have not provided enough information to know for certain. (Note also the semi-colon at the end of the line.) – mah Jun 08 '14 at 12:06

1 Answers1

1

class is a keyword mainly used in declarations. You probably meant:

getProcessor()->RequestUIUpdate();
Shoe
  • 74,840
  • 36
  • 166
  • 272