I defined the following agent
Main_Agent::Main_Agent() : Agent(PT_UDP) {
        ...
     bind("var_mainAgent", &var_mainAgent);
     ...
}
I also defined the following agent which inherits from the previous
My_Agent::My_Agent() : Main_Agent() {
            ...
       bind("var_myAgent", &var_myAgent);
         ...
}
When I execute my file I get the following message
warning: no class variable Agent/My_Agent :: var_mainAgent
I believe this is because the Main_Agent's constructor is not executed when I call the My_Agent's constructor. How do I solve this?
Kind Regards
 
 
No comments:
Post a Comment