Results 1 to 3 of 3

Thread: array problem

  1. #1

    Thread Starter
    New Member A_S_I_lepy's Avatar
    Join Date
    Jul 2008
    Location
    huh!
    Posts
    6

    array problem

    hi every one

    is this even correct ? (would there be any memory problem ?)

    Code:
    void **se;
    se = (void **) malloc(sizeof(*se) * 2);
    if this is correct then how will I find the length of the "se" in future ?

    thanks in advance
    Last edited by A_S_I_lepy; Jul 30th, 2008 at 02:22 PM.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: array problem

    I think all you're after is..
    Code:
    void **se;
    se = (void **)malloc(sizeof(void **));
    What length exactly are you after? The length of **se? Or the length of *se?

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    New Member A_S_I_lepy's Avatar
    Join Date
    Jul 2008
    Location
    huh!
    Posts
    6

    Re: array problem

    I wanna find the length of **se

    and also the code will let the array only have 1 item not 2. I want the **se to have 2 *se.

    thanks

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