[ndnSIM] forward declaration error
Alex Afanasyev
alexander.afanasyev at ucla.edu
Wed Apr 10 16:06:06 PDT 2013
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
More information about the ndnSIM
mailing list