Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将字符数组数据复制到字节数组中。例如 :
char buffer[20] = "00020406080A0C0E1012"; byte data[10];
那么,如何将字符数组数据复制到字节数组中..
请给出解决方案。谢谢
使用 for 循环:
for (i=0;i<elCount(buffer);i++) { data[i] = buffer[i]; }
转换应该是自动的。