OMNET++ how to access function or variables in another class
问题 I have modified inet NodeStatus.cc with a customized function that return the variable value as follows: int NodeStatus::getValueA() { return ValueA; } Then, I created another simple module called simpleNodeB.cc and I wanted to retrieve ValueA from NodeStatus.cc. I tried the following code in simpleNodeB.cc but didn't work: if(getParentModule()->getSubModule(NodeStatus).getValueA()==test1) bubble("Value is the same"); The error message I got -> error: expected expected primary-expression