Results 1 to 5 of 5

Thread: Character array array (array of strings pretty much) won't deallocate

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    WGTN, New Zealand
    Posts
    338

    Character array array (array of strings pretty much) won't deallocate

    I have an array of strings which is pretty much like this:

    PHP Code:
    char *Filenames[256];
    Filenames = (char (*)[256]) calloc (FileCount256);
    /* blah blah blah */
    free (Filenames/*causes problem of some sort*/ 
    I've also tried this way:

    PHP Code:
    char *Filenames[256];
    Filenames = new char[FileCount][256];
    /* blah blah blah */
    delete [] Filenames /*causes EXACT same problem */ 
    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).
    Last edited by Dreamlax; Aug 19th, 2003 at 02:18 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width