How to convert Java String into byte[]?

后端 未结 8 1558
不知归路
不知归路 2020-11-22 16:00

Is there any way to convert Java String to a byte[] (not the boxed Byte[])?

In trying this:

System.ou         


        
8条回答
  •  执笔经年
    2020-11-22 16:23

    It is not necessary to change java as a String parameter. You have to change the c code to receive a String without a pointer and in its code:

    Bool DmgrGetVersion (String szVersion);
    
    Char NewszVersion [200];
    Strcpy (NewszVersion, szVersion.t_str ());
    .t_str () applies to builder c ++ 2010
    

提交回复
热议问题