I am currently writing a function to obtain all of a listview control's data and store it into a multidimensional array of pointers. the reason for this is simply because it makes it easier for me to access each string of listview data.
I have a listview (LVS_REPORT) with 4 columns. here is how I am declaring my multidimensional array of pointers:
where 50 is the max number of rows, and 4 is the number of columns. now here is how I am attempting to obtain the data:Code:char *szListData;
what am I doing wrong here? nListNum is the number of items listed in the listview, which is a number less than or equal to 50.Code:for(i = 0; i < nListNum; i++) for(j = 0; j < 4; j++) ListView_GetItemText(hwndList, i, j, szListData[i][j], _MAX_FNAME);
whenever I attempt to print anything from szListData (just to see if it worked), Windows throws up an error message saying that the application needs to be closed.
could anyone please tell me what I am doing wrong here?
any help is greatly appreciated .