title: C++ Emulating int main(int argc, char *argv[]) from node
body: <p>Basically I am working on integrating an existing C++ file with our javascript / node using their NAPI, functionality. I have it working on a test C++ file so I know I have the setup working. However on the actual C++ file it is designed to run from the command line with argc and argv from the command line. Basically I just need to invoke the main method in C++ from inside of my other function, which means there is no command line. So I have to pass in values for argc and argv. argc is just an int, that is easy enough, but argc is a char ** type, which from my research looks like it is an array of character arrays aka strings? </p>
  
  <p>This is my current code at the bottom of my c++ file</p>
  
  <pre><code>void Init(Env env, Object exports, Object module) {
      exports.Set("main", Function::New(env, main(2,{"test","test2"})));
  }
  NODE_API_MODULE(addon, Init)
  </code></pre>
  
  <p>The argc value is working fine</p>
  
  <p>I am trying to create a temporary / test value for argv to pass in but I am having an issue figuring out how to make an array of type char ** with my values. </p>