C++ TCHAR* 与char* 互转 在MSDN中有这么一段: Note: The ANSI code pages can be different on different computers, or can be changed for a single computer, leading to data corruption. For the most consistent results, applications should use Unicode, such as UTF-8…
(1)String类型转char[] 类型,使用String类型的toCharArray()方法: (2)char[] 类型转String类型,使用String.valueOf()方法: public class Test { public static void main(String[] args) { // String转char[] String str = "Hello World!"; char[] cs = str.toCharArray(); for (char c :…