Originally Posted by
watchdogger
Yes, I changed the first one yeah but in the other parts I don't which arg to use because I don't use others...
Right. So why do you have 7 arguments in the first place? Because you have three arrays, and each has a size argument, and then you need a result size as well.
Oh, and a few more comments on your code:
Code:
pSize[0] = counter; // return by pointer the size of the result array
Whilst this does indeed set the location pointed to by pSize to counter, it is probably a better option to do:
Code:
*pSize = counter; // return by pointer the size of the result array
since pSize is not an array of one element, it is the address of a single integer. [and please do not allocate 1 integer's worth of space. Use a local variable and take it's address, e.g.
Code:
int resultSize;
...
result = culc_U(...., &resultSize);
Do not use standard names for variables:
Bad name for a variable - there is a standard type called size_t. You wouldn't call a variable "int" or "float", would you?
Code:
int j, groups_num, size_u, size_x, size_y, size_z, size_exp = 0, size_t = 0, *p_size;
Do not mix initialize and uninitialized variables on the same line - it's hard to follow (I personally also dislike LONG lists of variables on one line - if there are two or three closely connected variables, they may be on the same line - but not 8 different variables which aren't closely connected).
--
Mats