From: jason_zions AT interix DOT com (Jason Zions) Subject: RE: bool and gcc 11 Aug 1998 05:03:53 -0700 Message-ID: <31AA903A2A1FD111A06300805F4B6D6401D518B7.cygnus.gnu-win32@ssi2.opennt.com> Mime-Version: 1.0 Content-Type: text/plain To: "'Inquisitor Nikodemus'" , gnu-win32 AT cygnus DOT com > .cc:120: warning: name lookup of `index' changed for new ANSI `for' scoping > .cc:119: warning: using obsolete binding at `index' > > What's that "new ANSI 'for' scoping" ? ANSI C++ had a late change regarding the scoping rules for variables declared as part of a "for" statement. I forget the specific details; I remember reading an article in C/C++ Users Journal which discussed it. > And the next one : > _x.cc:122: request for member `figure' in `nodebufstat', which is of > non-aggregate type `node *' > > Line 122 is : *(nodebufstat).figure=-1 ; > > thats the structure "node" : > > typedef struct { > char figure; > short base1,base2; > } node; > >... and that's declaration of nodebufstat pointer : > >node *nodebufstat=&stattab[0]; That's just plain bad code on your part. Either you meant to write (*nodebufstat).figure = -1; or you meant nodebufstat->figure = -1; The error message is quite clear; it thought you were looking for a member variable, 'figure', in the object 'nodebufstat'; unfortunately, that object is a pointer to a node struct, not itself a node struct. You got the dereference operator in the wrong place. (Check the precedence rules for '*' as the dereference operator versus '.' as the member selection operator.) Jason Zions Softway Systems Inc. http://www.interix.com - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".