title: Use different parameter data types in same function? (C++)
body: <p>So say I had:</p>
  
  <pre><code>public: static void print(string message) { }
  </code></pre>
  
  <p>Is there a way I could make it accept other data types <strong>(eg. int, double etc)</strong> in the same function?
  So I could call it like <code>print(7)</code> and it would work?</p>
  
  <p>Thanks everyone for the answers; in the title I wanted it as the same function because I didn't realise functions could have the same names as each other (like variables). Hence, I thought the only way you could do it was through the same function. As I am quite new to C++, I preferred the method of just using the same function name and doing it with different parameters (the overloading method). </p>