Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about changing my data structure

Author: Uri Blass

Date: 02:57:42 07/17/03

Go up one level in this thread


On July 17, 2003 at 05:40:09, Richard Pijl wrote:

>On July 17, 2003 at 05:06:16, Uri Blass wrote:
>
>>Note that the name of the arrays that I have is different but I replaced the
>>names to make it easy to understand the problem.
>>
>>I have an array A[64][8]
>>
>>I want to replace it by 8 arrays A0[64],A1[64],...A7[64] when A[i][j]=Aj[i]
>>
>>What is the best way to do it?
>
>elt_t A[8][64]
>elt_t* A0;
>elt_t* A1;
>...
>elt_t* A7;
>
>A0=&A[0][0];
>A1=&A[1][0];
>
>Now you can use either A0[x] or A[0][x], which will point at the same element.
>
>Richard.

Thanks

I guess that it means that I need first to change the order of the array A.
elt_t is probably the type of the array that I did not mention and
I am going to use int* because it is an array of 32 bit integers.

Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.