C#调用dll输出string乱码
c++编写的dll中的函数:    
   static string str;
   string *A()
   {
      str=“asasdfsdf”
      return str;
   }
C#中调用:
[DllImport("dll.dll",CharSet=harSet.ansi)]
public static extern string A();
public string str1=A();   
print(str1);
str1输出会乱码位什么?
------解决方案--------------------乱码位?
楼主的意思是,这个输出的东西是乱码,还是你要问乱码出现的位置?
------解决方案--------------------c++ string 不能直接传给c#
------解决方案--------------------
------解决方案--------------------C#中的string和C++的string是不同的, 用char*