|
From: Stephanie S. <ste...@sa...> - 2011-06-17 17:17:46
|
Yes, of course :) I've been blind not to see that.
Thanks to all of you!
Stephanie
On 17.06.2011 18:02, Dave Goodell wrote:
> On Jun 17, 2011, at 10:52 AM CDT, Stephanie Stroka wrote:
>
>> Am 17.06.2011 17:49, schrieb Tom Hughes:
>>> On 17/06/11 16:45, Stephanie Stroka wrote:
>>>
>>>> My code at that position looks like this:
>>>>
>>>> 284 static uint* sort(uint** matrix, uint width, uint height) {
>>>> 285 uint* data = (uint*) malloc(width * height * sizeof(uint));
>>>> 286 uint i,j=0;
>>>> 287 for(i=0; i<height; i++) {
>>>> 288 for(j=0; j<width; j++) {
>>>> 289 data[j + i*height] = matrix[i][j];
>
> Maybe you want "data[j + i*width]" instead?
>
> -Dave
>
|