0

I'm implementing vanet with OMNeT++ 5.3 and Veins 4.7.1 but I'm experiencing errors that I can't solve.

The code:

public:
    SienaStatisticsAccess() { }
    SienaStatistics* getIfExists() {
        //Finds a module by its path.
        return dynamic_cast<SienaStatistics*>(simulation.getModuleByPath("stats"));
    }

The error:

'simulation’ was not declared in this scope
thardes2
  • 1,162
  • 12
  • 28

1 Answers1

0

The code should look like:

return dynamic_cast<SienaStatistics*>(getSimulation()->getModuleByPath("stats"));

Using this at least the 'simulation’ was not declared in this scope will be gone.

thardes2
  • 1,162
  • 12
  • 28