[omniORB] Problem: no matching function for call to
CosNaming::BindingList_var::length()
Dan Kegel
dank@kegel.com
Thu, 14 Feb 2002 16:22:43 -0800
Stefan Seefeld (seefeld@sympatico.ca) wrote:
> > I'm having problems with OmniOrb 3 and iterating through
> > a naming context. ...
> > corbaftpbench.cc:125: no matching function for call to
> > `CosNaming::BindingList_var::length ()
> > CorbaPlatoon_var *platoons = new CorbaPlatoon_var[bl.length()];
> > ^^^^^^^^^^^
> > ...
> > What gives? Hopefully I just made some newbie mistake.
>
> * you don't access the length of bl the way you do, but instead you
> dereference the sequence first. Read: bl->length() instead of
> bl.length(). (Again, don't let the fact that the sequence is wrapped
> by a smart pointer fool you !)
D'oh! Yep, bl->length() works. Thanks for helping me out
of my newbie jam. Now if only the compiler were so helpful.
(I knew there was a reason I disliked smart pointers...)
- Dan