随机字符串形式数组 - Windows Forms c++ Visual Studio

问题描述

我希望,当我运行程序时,我创建的每个按钮(以后的按钮会更多)都具有来自数组的随机字符串文本,我已经对其进行了初始化。我不知道我应该做什么。语言是c++。

我的数组如下所示:

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

/// <summary> 
/// Summary for MyForm
/// </summary>
public ref class MyForm : public System::Windows::Forms::Form
{
public:
    MyForm(void)
    {
        InitializeComponent();
        //
        //Todo: Add the constructor code here
        //
        //KPoP Idols ARRAY Initializing
        KPoP_Idols = gcnew array<String^> {"Rose","Yuna","Momo","Irene","ChungHa","Winter","IU"};
    }
protected:
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    ~MyForm()
    {
        if (components)
        {
            delete components;
        }
    }
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Label^ Timer;
private: System::Windows::Forms::Timer^ ShowButtonTextTimer;
private: System::Windows::Forms::Button^ button2;

 //KPoP Idols array Declaration
 array<String^>^ KPoP_Idols;

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)