I have an array of strings which is pretty much like this:
I've also tried this way:PHP Code:char *Filenames[256];
Filenames = (char (*)[256]) calloc (FileCount, 256);
/* blah blah blah */
free (Filenames) /*causes problem of some sort*/
Both of which behave the same way when I want to use them, I can still access character 5 of the 5th string by going Filenames[5][5] but I can't delete it, and it's kind of annoying, because I want to resize the array (and clear it at the same time). Any ideas on why I get these problems? It says "User breakpoint called from code at 0x77f97704", but I have no breakpoints or anything (it starts debugging the ASM).PHP Code:char *Filenames[256];
Filenames = new char[FileCount][256];
/* blah blah blah */
delete [] Filenames /*causes EXACT same problem */




Reply With Quote