How do I make a vector/array of System::Windows::Forms::Checkbox^

孤者浪人 提交于 2019-12-07 03:03:27

The regular std::vector does not support CLR reference types. Instead, you must use cliext::vector. Include the following:

#include <cliext/vector>

And use with:

cliext::vector<System::Windows::Forms::CheckBox^> items;
items.push_back(myCheckBox);

Of course, you can also use the regular .Net collections, like List<T>, which behaves similarly as a vector.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!