我不知道该怎么称呼,我认为它是多维char字符串。我的问题是:我有这个:
string serialnumber = "123456";
而且我想使用代码来实现
char tmp6[] = { '1','2','3','4','5','6', 0 };
//为字符串s赋值字符串s =“ geeksforgeeks”;
int n = s.length();
// declaring character array
char char_array[n + 1];
// copying the contents of the
// string to char array
strcpy(char_array, s.c_str());
https://www.geeksforgeeks.org/convert-string-char-array-cpp/