[ndnSIM] forward declaration error

Xiao yan Hu xhbreezehu at gmail.com
Wed Apr 10 18:41:29 PDT 2013


Hi Alex,

I forward declared it by "namespace cs {class Entry}".
I'll try your suggestion by "#include <ns3/ndn-content-store.h>".
Thanks very much.

Best regards,
Xiaoyan


On Thu, Apr 11, 2013 at 7:06 AM, Alex Afanasyev <
alexander.afanasyev at ucla.edu> wrote:

> Hi Xiaoyan,
>
> I can tell more, if you can give more context about where the error
> originated.
>
> What it could be is that you provided forward declaration of Entry as
> "struct Entry;", while cs::Entry is actually a class and should be
> forward-declared as "class Entry;"
>
> If you never explicitly declared Entry and the error related to the
> compiler's implicit attempt to figure out what cs::Entry is, then just
> include header file in your forwarding strategy header file:
>
> #include <ns3/ndn-content-store.h>
>
> Note, you should include file before start of any namespace, otherwise
> you'll get another set of strange errors.
>
> ---
> Alex
>
> On Apr 10, 2013, at 7:59 AM, Xiao yan Hu <xhbreezehu at gmail.com> wrote:
>
> > Hi,
> >
> > I kept getting errors " error: forward declaration of 'const struct
> ns3::ndn::cs::Entry'"?
> > would you guys please tell me what does this mean?
> > Actually I want to write my own custom forwarding strategy which is
> extended from best route and in which "Ptr<const cs::Entry> entry" is the
> argument of one function.
> > If I want to use Ptr<const cs::Entry>, how should I declare it?
> > Thanks very much!
> >
> > Sincerely,
> > Xiaoyan
> > _______________________________________________
> > ndnSIM mailing list
> > ndnSIM at lists.cs.ucla.edu
> > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130411/750679cb/attachment.html>


More information about the ndnSIM mailing list