Storing data from string to 2D array

hello,i want to store data getting from ble scan i.e.storing_data1.length() and add it to 2D array.....

i write function like n = storing_data1.length();
char char_array[20][70]; // declaring character array
strcpy(char_array[n], storing_data1.c_str()); // copying the contents of the string to char array

      for (int i = 0; i < n; i++)
         for (int j = 0; j < n; j++)
          myArray[nr][nc] = myArray[nr][nc]++;

can anyone please help mw out i am new at this platform........thank you

something like this you mean?

void setup() {
  // put your setup code here, to run once:
  char char_array[10][10]; // declaring character array


  for (int i = 0; i < 10; ++i) {
    //dummy data from ble scan ;)
    String str = "String #";
    str += String(i + 1, DEC);

    memcpy(&char_array[i][0], str.c_str(), str.length() + 1); //store data from string to 2D array

  for (int j = 0; j < 10; ++j) {
    Serial.println(char_array[j]); //print out 2D array


void loop() {
  // put your main code here, to run repeatedly:



String #1
String #2
String #3
String #4
String #5
String #6
String #7
String #8
String #9
String #10

be sure to check that your board has sufficient memory for the array size you want to use or the code will fail!

hope that helps....

great i will implement on my project now

sorry to say but i didn't undestand i want dynamic data from ble scan so in this where i can assign which function
thank you for responce

just use an array of strings then in place in a char 2D array and do storing_data1.c_str() conversion as and when you require to do so