这里有两个头文件files.Child和parent.Can有人解释为什么会发生这个错误吗?
提前感谢
SampleApplication.h:
#ifndef SAMPLEAPPLICATION_H_
#define SAMPLEAPPLICATION_H_
#include "ns3/CcnModule.h"
#include "ns3/CCN_Name.h"
#include <string>
class CcnModule;
class SampleApplication : public ns3::Application
{
public:
ns3::Ptr<CcnModule> ccnm;
static ns3::TypeId GetTypeId(void);
virtual ns3::TypeId GetInstanceTypeId (void) const;
SampleApplication();
SampleApplication(ns3::Ptr<CcnModule> ccnm);
virtual ~SampleApplication();
char* data;
int length;
ns3::Ptr<CCN_Name> dataName;
void SendInterest(ns3::Ptr<CCN_Name> n);
void SendData(ns3::Ptr<CCN_Name> data, char* buff, int bufflen);
virtual void InterestReceived(ns3::Ptr<CCN_Name> ccnn);
virtual void DataArrived(ns3::Ptr<CCN_Name> data, char* buff, int bufflen);
void AnnounceName(ns3::Ptr<CCN_Name> n);
virtual void DoDispose();
virtual void DoInitialize();
};
#endifReceiver.h:
#ifndef RECEIVER_H_
#define RECEIVER_H_
#include "ns3/CcnModule.h"
#include "ns3/CCN_Name.h"
#include <string>
#include <vector>
#include "ns3/SampleApplication.h"
class CcnModule;
//class SampleApplication;
class Receiver : SampleApplication
{
public:
static ns3::TypeId GetTypeId(void);
virtual ns3::TypeId GetInstanceTypeId (void) const;
Receiver(ns3::Ptr<CcnModule> ccnm);
virtual ~Receiver();
void SendInterest(ns3::Ptr<CCN_Name> n);
virtual void DataArrived(ns3::Ptr<CCN_Name> data, char* buff, int bufflen);
};
#endif发布于 2013-10-21 11:11:25
我不熟悉您正在使用的库,但我猜它是NS-3离散事件网络仿真器,粗略地看一下API,我希望看到包含
#include "ns3/application.h"在SampleApplication.h文件中。
它很可能已经被您的实现中的其他一些包含在其中,但乍一看似乎缺少它。
https://stackoverflow.com/questions/19485494
复制相似问题