title: How do I initialize a constant global variable from a runtime arguments?
body: <p>So, I've seen questions here on how to set global constant variables at runtime by prompting the user for input then using <code>cin</code>. However, I need to be able to set a constant global variable based on one of the arguments passed to main (ie from <code>argc</code>/<code>argv</code>). All of the solutions I found involved having a constructor function defined above the const variable's declaration, but this won't work if I can only access <code>argc</code> and <code>argv</code> from main.</p>
  <p>Is this at all possible? How could I implement this?</p>
  <p>Edit: Here's the question that talks about <code>cin</code>, for reference: <a href="https://stackoverflow.com/questions/12279601/are-there-any-tricks-to-use-stdcin-to-initialize-a-const-variable">Are there any tricks to use std::cin to initialize a const variable?</a></p>