title: cannot access argv value in functions that are initialized in constructor
body: <p>Unable to access argv value in parseCmdline function in myarm.cpp which is initialized in the constructor.
  Don't know how to pass/initialize the value from main(int argc, char *argv[ ]) in constructor?  </p>
  
  <p>main.cpp</p>
  
  <pre><code>#include "myarm.h"    
  int main(int argc, char *argv[]){
      cout&lt;&lt;"argv is:"&lt;&lt;argv[2]&lt;&lt;endl;
      MyArm arm;
  </code></pre>
  
  <p>myarm.cpp</p>
  
  <pre><code>#include "myarm.h"
  
  MyArm::MyArm(){
      nj = 0;
      done = false;
      times = 0;
      count = 50;
      which_joint = 0;
      cout&lt;&lt;"argv is:"&lt;&lt;argv[2]&lt;&lt;endl;
      parseCmdline();
  }
  
  int MyArm::parseCmdline() {
      params.fromCommand(argc, argv);
      if (!params.check("robot")){
          cout&lt;&lt;"Please specify name of the robot"&lt;&lt;endl;
          cout&lt;&lt;"--robot name (e.g. TechNit)"&lt;&lt;endl;
          return 1;
      }
  
      else if(!params.check("element")){
          cout&lt;&lt;"Please specify name of the element"&lt;&lt;endl;
          cout&lt;&lt;"--element name (e.g. left_arm)"&lt;&lt;endl;
          return 1;
      }
  }
  </code></pre>