- 论坛徽章:
- 0
|
- typedef int Tsymbol;
- struct Tsquare;
- typedef Tsquare *Psquare;
- struct Tprior
- {
- int pv,ps[4]; //evaluation in 4 directions and sum
- int i; //in which linked list
- Psquare nxt,*pre;//linked list pointers
- };
- struct Tsquare
- {
- Tsymbol z; //0=nothing, 1=my, 2=opponent, 3=outside
- Tprior h[2]; //evaluation for both players
- short x,y; //coordinates 0..width-1, 0..height-1
- Psquare *inWinMoves; //pointer to winMoves1 array
- };
复制代码
Tprior 里面包含了 Psquare ,Psquare 是 Tsquare的指针,Tsquare里面又包含了Tprior ,这不成死循环了么?
Tsquare里有Psquare ,Psquare 是 Tsquare的指针,又是死循环?
彻底晕了
C下编译不过去
C++下可以
哪位讲讲,C++是怎么理解的
[ 本帖最后由 NetSpider 于 2007-11-2 12:52 编辑 ] |
|