I dont know how to call it, I think its multidimensional char string. My problem is: I have this:
string serialnumber = "123456";
And I want to make this using code
char tmp6[] = { '1','2','3','4','5','6', 0 };
I dont know how to call it, I think its multidimensional char string. My problem is: I have this:
string serialnumber = "123456";
And I want to make this using code
char tmp6[] = { '1','2','3','4','5','6', 0 };
// assigning value to string s string 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/