Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/135.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 将文本框传递给函数。c++;_C++_.net_Managed C++ - Fatal编程技术网

C++ 将文本框传递给函数。c++;

C++ 将文本框传递给函数。c++;,c++,.net,managed-c++,C++,.net,Managed C++,问题是:我无法将textBox1->text传递到此函数。此外,似乎我甚至无法创建指向textBox1->text的指针。Visual Studio编译了函数,但我无法测试它。函数代码是: #include "MyForm.h" void showvec(System::Windows::Forms::TextBox^ &textBox) { textBox->Text = ""; }` 电话是: void showvec(System::Windows::Forms::

问题是:我无法将
textBox1->text
传递到此函数。此外,似乎我甚至无法创建指向
textBox1->text
的指针。Visual Studio编译了函数,但我无法测试它。

函数代码是:

#include "MyForm.h"
void showvec(System::Windows::Forms::TextBox^ &textBox)
{
    textBox->Text = "";
}`
电话是:

void showvec(System::Windows::Forms::TextBox^ textBox)
{
    textBox->Text = "hgghjg";
}
我在别的地方得到了这个答案。我希望它能帮助别人。

功能代码是:

#include "MyForm.h"
void showvec(System::Windows::Forms::TextBox^ &textBox)
{
    textBox->Text = "";
}`
电话是:

void showvec(System::Windows::Forms::TextBox^ textBox)
{
    textBox->Text = "hgghjg";
}
我在别的地方得到了这个答案。我希望它能帮助别人