dynamic - Dynamically initialising a pointer to pointer -


hii,

I started an indicator for the indicator like this:

/ / I = The number of objects, the indicator will indicate ....

I calculate the number of situations that are present in a SQL query and to store these >

Conditions Structure (Structure Status) ..

So I do not have any status in the query

// Last item I'm setting it in hell dats (i + 1) Statement in malloc ..

// Low Ikit announced ...

  strait status ** COND;   

// Initialization of COND

  SQL_INS-> gt; S.COND = malloc ((i + 1) * sizeof (struct position *));     

> SQL_INS-> S.COND [j] = maulock (shape position);

I want to know what this is the right way to do it .. or any better way ...

thanks .... :)

Please spell correctly and make your question a bit more clear and you will not get the answer. ..

  SQL_INS-> S.COND = Molok (((i + 1) * sizeof (struct position *)) + (i * sizeof (struct position)) struct condition ** ptr = SQL_INS- & gt; S.COND; Structure Status * cur = (Straight Position *) (PTR + I + 1); Int j = 0; For (; j & lt; i; j ++) * (ptr + j) = cur ++; * (PTR + J) = Faucet;   

This keeps all the memory in one block instead of mallocing different parts for the condition of each frame. I thought it could make your code more readable dots because I did it :)

Comments