当前位置: 代码迷 >> VC >> C++/CLI Tracking Handler 传参有关问题
  详细解决方案

C++/CLI Tracking Handler 传参有关问题

热度:7942   发布时间:2013-02-25 00:00:00.0
C++/CLI Tracking Handler 传参问题
正在学C++/CLI,遇到个问题?

using   namespace   System;
//using   namespace   System::Text::RegularExpressions;


void   AddParameter(String^   line)
{
      line   +=   "7 ";
}


int   main(array <String^> ^   argv)
{
        String^   line   =   gcnew   String( "123456 ");
Console::WriteLine( "Operatin   before   AddParameter   function   is   {0} ",line);

AddParameter(line);

Console::WriteLine( "Operatin   after   AddParameter   function   is   {0} ",line);

line+= "8 ";

Console::WriteLine(line);

        return   0;
}


为什line值不是   12345678

------解决方案--------------------------------------------------------
string 特殊性
  相关解决方案