爪哇:
byte[] arr1=new byte[]{0x01};
String aa = "helloo";
short[] s1 = new short[1]; // **
s1[0] = 246; // **
Object[] obj = new Object[]{s1,arr1,aa}
C:
signed char a1[] = {0x01};
char *str = "helloo";
short int st1[] = {246}; // **
char* c [] = {st1,str1,c2};
是否short int st1[] = {246}
正确?我收到了这个错误:
“ illegal implicit conversion from 'short *' to 'char *'
”。如何将short分配给char?