title: C++ Execute a function through cmd or shell
body: <p>First thing,sorry my bad english and any mistakes in asking.
  I've searched it a lot,but i was not able to explain in simple words.
  I work with Linux servers and command line, i'm used to calling programs through it like</p>
  
  <pre><code>./program foo -u adm -p 123
  </code></pre>
  
  <p>But i always wondered how make programs to act like that,i mean call a specific function and write parameters without needing to open program itself.</p>
  
  <p>In other words.</p>
  
  <p>If i code a C++ like that,and compile</p>
  
  <pre><code> #include &lt;iostream&gt;
   using namespace std;
  
   void SayHello(string Name)
   {
       cout &lt;&lt; " Hello " &lt;&lt; Name;
   }
  </code></pre>
  
  <p>how can i call it through the command line like</p>
  
  <pre><code>./Program SayHello CARLOS
  </code></pre>
  
  <p>Sorry about my ignorance,but it's something that i want to learn.</p>
  
  <p>Thanks for your attention</p>