Code:
char myData[90][3][50]; //90 rows, 3 columns, each block 50 chars long
char **tableData[90] = {NULL};
const char* text;
text = sqlite3_column_text(stmt, col_index);
text_lenght = strlen(text) + 1; // add 1 to get null
strncpy(myData[row_index][c_index], text, text_lenght);
//top line in a loop for all rows and each column <--EDIT the assignment is outside the column loop within the row loop.
tableData[row_index] = myData[row_index]; <--?Warning on this line
I need tableData to correctly point to contents of myData but it's not happening.
The warning is:
Code:
: warning C4047: '=' : 'char ** ' differs in levels of indirection from 'char (*)[50]'
During run time I can see myData properly populated how I expect. However, tableData is filled with bad pointers...
Any help is appreciated.
Thanks.