Kandy wrote:
> I allocated some memory with malloc
> ligneb[indx]=(short*) malloc ((strlen(buffer)*
+1);
>
> but know I need to insert the single value inside
> ligneb[0] I need to insert all my binary value
>
> How can I increase the position?
> How can I jump to any position?
I have no idea what you're talking about. What is 'ligneb'?
What single value are you inserting into 'ligneb[0]'? How
was 'ligneb[0]' allocated?
If you need to increase the length of a dynamic array that
was allocated using 'malloc', use 'realloc'.
In most cases, if you're trying to use C++, malloc and any
other C memory management functions just don't cut it. Neither
do 'new' and 'delete', for beginners, anyway. Try using the
standard containers. E.g., instead of
short *ligneb[somany];
do
std::vector<std::vector<short> > ligneb(somany);
and anything growing from that...
Get a good C++ book.
V