This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: non-aggregate type question


Jim:

You probably are missing a "}" before the posted code begins,
and the compiler thinks that "void Circut::Findstart()" is in
the method "Checkboard".

Robert

"Jim M." wrote:
> 
> does anyone knows why i am getting these errors?.
> linux.
> J
> 
> g++ -c circuit.cc
> .
> .
> circuit.cc: In method `void Circuit::Checkboard ()':
> circuit.cc:916: request for member `Findstart' in `this', which is of
> non-aggregate type `Circuit *'
> circuit.cc:921: request for member `Open' in `this', which is of
> non-aggregate type `Circuit *'
> .
> .
> void Circuit::Findstart()
> {
>   int x=0;
>   int y=1;
>   char tag ='n';
> 
>   while (tag=='n' || tag =='N')
>     {
>       x=x+1;
>       if (x> (Breadboard.columns()-2) )
>         {
>           x=1;
>           y=y+1;
>         }
>       tag=Breadboard(x,y).Returntype();
>     }
>   Start.moveTo (x,y);
> }
> .
> .
> /*returns 0 is the current componet is a void */
> int Circuit::Open()
> {
>   int x,y;
>   x= (int)Current.x();
>   y= (int)Current.y();
>   char tag;
> 
>   tag=Breadboard(x,y).Returntype();
>   if (tag=='n' || tag=='N')
>     {
>       return 0;
>     }
>   else
>     {
>       return 1;
>     }
> }
> .
> .
> 
> Makefile:
> prog3:prog3.o circuit.o deeqn.o point.o
>         g++ -o prog3 prog3.o circuit.o deeqn.o point.o
> 
> prog3.o:prog3.cc circuit.h deeqn.h
>         g++ -c prog3.cc
> 
> circuit.o: circuit.cc circuit.h array2.h component.h point.h
>         g++ -c circuit.cc
> 
> point.o: point.cc point.h
>         g++ -c point.cc
> 
> deeqn.o: deeqn.h deeqn.cc
>         g++ -c deeqn.cc
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  rboehne@ricardo-us.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]