[ndnSIM] Private Class Error even after an Attempt to Fix

Justin Rodrigues justin99 at student.fdu.edu
Mon Jun 28 09:39:20 PDT 2021


Hello Everyone,

I hope you are doing well.

Currently I am facing an error like this which I am unsure how to correct since I have not had it before in c++.

../src/ndnSIM/examples/mobility-tree-walk3.cpp: In function ‘int ns3::main(int, char**)’:
../src/ndnSIM/examples/mobility-tree-walk3.cpp:171:37: error: ‘virtual void ns3::ConstantVelocityMobilityModel::DoSetPosition(const Vector&)’ is private within this context
   myM.DoSetPosition(Vector(10,10,10));
                                     ^
In file included from ./ns3/mobility-module.h:14:0,
                 from ../src/ndnSIM/examples/mobility-tree-walk3.cpp:24:
./ns3/constant-velocity-mobility-model.h:59:16: note: declared private here
   virtual void DoSetPosition (const Vector &position);
                ^~~~~~~~~~~~~

Waf: Leaving directory `/home/justin/Downloads/ndn_sim_mobility/ndnsim/ns-3/build'
Build failed
 -> task in 'mobility-tree-walk3' failed with exit status 1 (run with -v to display more information)

It is not letting me access a function since its declared as private so I havedeclared the function in the c++ document and edited that file to make the function pubilc yet ns-3 still thinks its private.

Sincerely,

Justin Rodrigues
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210628/677ecb5f/attachment-0001.html>


More information about the ndnSIM mailing list