无法使用std :: vector [C ++,wxWidgets]向wxComboBox添加项目

问题描述 投票:0回答:1

试图通过这种方式:

File.cpp:

void File__Frame::loadCB()
{
   std::vector<std::string> Ids;
   IdTypes.reserve(4);
   IdTypes.push_back("1");
   IdTypes.push_back("2");
   IdTypes.push_back("3");
   IdTypes.push_back("4");
   combobox->Set(Ids);  
}

但是它不起作用,有人可以告诉我此代码的“更正”版本吗?

我不知道该代码是否错误或是否需要在File__Main.h中添加一些内容

当前,我收到此错误:no declaration matches 'void File__Frame::loadCB()'

问候

c++ wxwidgets
1个回答
0
投票

@@ var_null,请检查wx发行版中的小部件或组合示例。

也没有wxComboBox::Append(std::vector<std::string>)

© www.soinside.com 2019 - 2024. All rights reserved.