[aspectc-user] Re: [aspectc-user] How to introduce a method into a class ??
    Bartosz Blimke 
    masb at chorwacja.com
       
    Tue Jul 27 17:31:34 CEST 2004
    
    
  
> Hello,
>
> I am trying to introduce some variables and methods
> into a class using AspectC++. As i read into the
> quickref for aspectC++ "if the advice is not
> recognized of being of a predefined kind, is is
> regarded as an introduction of a new method,
> attribute, or type ..."
>
> my code is the following :
>
>
> aspect TEST {
>
> advice "Class1" : void do_some_work() {
> 							  cout << "doing some work" << endl;
> 							  return;
> 							  }
> };
>
>
> But i get an error with ac++ :
>
> In file included from ac_gen.cc:32:
> test.ah:3: syntax error before `{'
> ac_gen.cc:7: syntax error before `::'
>
> Is the syntax of my method introduction ok or not ?
> any suggestions ?
>
> Thanks.
>
This code is ok, could you send some more code to see the problem ?
Here everything seems to be ok.
Bartosz Blimke
    
    
More information about the aspectc-user
mailing list