[algogeeks] Re: dynamic memory allocation in C

2007-03-13 Thread hijkl
hi Peri, you can't use this int number int array[number]; and also wat is the value of "number"? array size should be constant. example int array[10]; if you not sure about array size initially and need to assign at run time then you need to allocate it as dynamic. you can do something like thi

[algogeeks] Re: dynamic memory allocation in C

2007-03-11 Thread NUPUL
On Mar 10, 4:15 am, "programming" <[EMAIL PROTECTED]> wrote: > Hey all, i am working on putting dynamic memory allocation in a small > C program, but i am not sure if i am doing it right. Can somebody > please explain to how to correct the code, and if i am using pointers > correctly. I worked o