Am I using default arguments incorrectly? <p>I've just started going through a beginners book of C++. I have some java experience (but having said that, I've never used default arguments in java to be honest)</p> <p>So, as mentioned, my issue is with default arguments..</p> <p>This is the code snippet I'm using:</p> <pre><code>#include &lt;iostream&gt; using namespace std; //add declaration int add(int a, int b); int main (void) { int number1; cout &lt;&lt; "Enter the first value to be summed: "; cin &gt;&gt; number1; cout &lt;&lt; "\nThe sum is: " &lt;&lt; add(number1) &lt;&lt; endl; } int add(int a=10, int b=5) { return a+b; } </code></pre> <p>The response I get from g++ compiler is: "too few arguments to function 'int add(int, int)'</p> <p>Am I doing this wrong? (I've also tried it with literal arguments)</p> <p>P.S. I can't seem to get the code snippet to display properly? Has the system changed?</p>