Hi. Suppose I want to implement a function like this: void function_name(int length, short *array) { array = (short*)malloc(sizeof(short)*length); .... .... } This unfortunatelly doesn't work. To work I must place the allocation line (array = (short*)malloc(sizeof(short)*length) in my main(), just before calling the function. Why is this happening? Thanx
Theodore Personal Web Page (some audio segmentation tools): www.di.uoa.gr/~tyiannak
Forum Rules
Bookmarks