[omniORB] Problem while using Module construct!!

David Riddoch djr@uk.research.att.com
Mon, 6 Sep 1999 09:17:31 +0100 (GMT)


On Mon, 6 Sep 1999, SatyaNarayana Dillikar wrote:

> Hello everybody ,
> 	I have defined ,an idl as 
> 
> module Counter
> {
>   interface count
>     {
>       attribute long sum;
>       long increment();
>     };
> };
> 
> 
>  When I compiled I got the following errors :
> 
> count_c.cc:13: no matching function for call to `::Counter::count_var::sum
> (long int)'
> count_c.cc:23: no matching function for call to
> `::Counter::count_var::increment ()'
> count_c.cc:33: no matching function for call to `::Counter::count_var::sum
> ()'

_var types behave like pointers, so you should be doing:

Line13:c->sum((long)0);

Line23:c->increment();

Line33:c->sum()


David


> File count_c.cc is as follows :
> 
> 	...
> Line 2:Counter::count_var c =Counter::count::_narrow(obj); 
> 	...
> Line13:c.sum((long)0);
> 	...
> Line23:c.increment();
> 	...
> Line33:c.sum()
> 	...
> 
> 
> I think the problem is with module struct..Would anybody knows where the
> error lies..
> 	Also ,I wish to know ,if anybody has tried using the module struct
> ..If yes ,I request him to send me the idl and implementations files.. 
> 
> 	Thanks a lot!
> 
> with regards,
> satya
> 
> 
> 
>