string *temp;
系统报错:托管类型不能间接寻址我使用fixed也不能寻址,
请问有什么方法马?
谢谢

解决方案 »

  1.   

    string *temp;
    ->>
    char *temp;
      

  2.   

    fixed(char* temp = "aaa")
    {
     Console.WriteLine((int)temp); // temp的地址
    }
      

  3.   

    回 Sunmast(速马, C++/CLI)  string *temp;
    ->>
    char *temp;是什么意思?
      

  4.   

    Sunmast(速马, C++/CLI) 
    尽职尽责呀,不望大家这么拥护你呀
    希望你生活顺利
      

  5.   

    要在用到的方法前加 unsafe
      

  6.   

    请参考:http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/csref/html/vclrffixed.asp
      

  7.   

    char *temp;楼主还没有对这个完全明白,建议暂时不要用指针。