A Good Way to Store C++ CLI Arguments? (W/O using libraries)
<p>So, I'm writting a CLI application in C++ which will accept a bunch of arguments.
The syntax is pretty typical, -tag arg1 arg2 -tag2 arg1 ...</p>

<p>Right now, I take the char** argv and parse them into an </p>

<pre><code>std::map&lt; std::string, std::list&lt;**std::string** &gt; &gt; &gt;
</code></pre>

<p>The key is the tag, and the list holds each token behind that tag but before the next one.  I don't want to store my args as just std::strings; but I need to make it more interactive.</p>

<p>By interactive, I mean when a user types './myprog -help' a list of all available commands comes up with descriptions.</p>

<p>Currently, my class to facilitate this is:</p>

<pre><code>class Argument
{
public:
   Argument(std::string flag, std::string desc);
   std::string getFlag();
   std::string getDesc(); 
   std:;list&lt;std::string&gt; &gt; getArgs();
   void setArgs(std::list&lt;std::string&gt; &gt; args); 
   bool validSyntax()=0;
   std::string getSyntaxErrorDesc()=0; 
};
</code></pre>

<p>The std::map structure is in a class ProgramCommands which goes about handling the these Arguments.</p>

<p>Now that the problem description is over, my 4 questions are:</p>

<ol>
<li>How do I give the rest of the program access to the data in ProgramCommands?
I Don't want to make a singleton, at all; and I'd prefer to not have to pass     ProgramCommands as an arg to almost every function in the program.</li>
<li>Do you have better ideas about storing how I'm doing this?</li>
<li>How best can I add arguments to the program, without hardcoding them into the ProgramCommands, or main?</li>
<li>std::string only allows for 1 line descriptions, does anyone have an elegant solution to this besides using a list of strings or boost?</li>
</ol>

<p><strong>EDIT</strong>
I don't really want to use libraries because this is a school project (sniffing &amp; interpreting packets).  I could, if I wanted to, but I'd rather not.</p>
