1

嘿,伙计们,这是我的代码,我对 C++ 比较陌生,甚至编码真的不知道为什么我会遇到解析错误,尽管根据我的理解,我已经正确放置了括号,如果我在这里遗漏了什么,请提出建议。

我在这一行遇到错误

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

完整代码:

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
}
4

1 回答 1

1

class是主要用于声明的关键字。你可能的意思是:

getProcessor()->RequestUIUpdate();
于 2014-06-08T12:10:03.943 回答