首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

VC2010怎么用TextBox控件输出字符数组(char buf[128])

2013-03-27 
VC2010如何用TextBox控件输出字符数组(char buf[128])char buf[128]this-txt1-Textbuf我的是代码是这

VC2010如何用TextBox控件输出字符数组(char buf[128])

char buf[128];
this->txt1->Text=buf;

我的是代码是这样;
VC报错:
错误2error C2664: “void System::Windows::Forms::Control::Text::set(System::String ^)”: 不能将参数 1 从“char [128]”转换为“System::String ^”c:\users\angel\documents\visual studio 2010\projects\网络传输服务器端vc\网络传输服务器端vc\Form1.h2581网络传输服务器端VC

[解决办法]
this->txt1->Text=CString(buf);

热点排行