ns-3模拟中的错误
Error in a ns-3 simulation?
我正在尝试运行模拟,但一直遇到一些错误。我不是C++方面的专家,但我认为这是因为包含了头文件。我得到以下错误:
error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
void OutInterest(Ptr<const ns3::ndn::InterestHeader> interestHeader,Ptr<const ns3::ndn::Face> face) {
^
../scratch/vndn_simulation.cc:87:52: error: template argument 1 is invalid
void OutInterest(Ptr<const ns3::ndn::InterestHeader> interestHeader,Ptr<const ns3::ndn::Face> face) {
^
../scratch/vndn_simulation.cc:87:28: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
void OutInterest(Ptr<const ns3::ndn::InterestHeader> interestHeader,Ptr<const ns3::ndn::Face> face) {
你知道如何解决这个错误吗?
这里说:
class NameComponents; ^ In file included from ./ns3/ndn-v2v-net-device-face.h:31:0, from ../scratch/vndn_simulation.cc:15: ./ns3/ndn-header-helper.h:34:21: note: ‘ns3::ndn::NameComponents’ has a previous declaration here typedef Name NameComponents; ^
不能正向声明NameComponents
,因为编译器已经看到它是typedef
而不是类。
相关文章:
- 在同一模拟中使用静脉和静脉_ inet内容时出现运行时错误
- 基于栅格的流体模拟错误
- 为什么谷歌测试/模拟显示 std::unique_ptr 泄露的模拟对象错误?
- 模拟 __name__ = __main__ 在 c++ 中会导致错误"未定义类似函数的宏"
- 谷歌模拟分割错误与简单的EXPECT_CALL案例
- 将递归模拟为堆栈返回错误
- Google模拟和VCPKG未解决的外部符号错误
- C 中模拟模板的错误
- 编译器错误,用静态多主体主义模拟C++单元测试
- 在C++中模拟自上而下添加时出现分段错误
- C++:模拟餐饮公司计费程序-无法将错误数据输出到错误文件
- Turtle(模拟框架)编译错误
- 用于模拟弹簧运动的代码中的分段错误
- ns-3模拟中的错误
- 简单运动模拟中的分段错误
- 模拟读数计算错误
- GetDiskFreeSpaceEx Windows API即使在模拟完成后也会给出错误的值
- 谷歌模拟编译错误(错误:"<函数名称>"不是一种类型)
- 析构函数中的模拟总线错误
- omnet中的导航层次错误:模拟以退出代码:139终止