title: difference between *b= *b+1 and *b++
body: <p>I am trying to change the actual value of a and b in the main function. But when I use *b++ to increment the value of b. It is not working.</p>
  
  <pre><code>#include&lt;iostream&gt;
  
  using namespace std;
  
  
  int F(int *b,int *c ){
      *b++;
      *c++;
  
  }
  int main(){
      int a=1 , b=2;
      cout&lt;&lt;a&lt;&lt;" "&lt;&lt; b&lt;&lt;" ";
      F(&amp;a, &amp;b);
  
      cout&lt;&lt;a&lt;&lt;" "&lt;&lt; b;
  }
  </code></pre>
  
  <p>but in 2nd Case, the code is working fine.</p>
  
  <pre><code>#include&lt;iostream&gt;
  
  using namespace std;
  
  
  int F(int *b,int *c ){
      *b = *b+1;
      *c = *c+1;
  
  }
  int main(){
      int a=1 , b=2;
      cout&lt;&lt;a&lt;&lt;" "&lt;&lt; b&lt;&lt;" ";
      F(&amp;a, &amp;b);
  
      cout&lt;&lt;a&lt;&lt;" "&lt;&lt; b;
  }
  </code></pre>
  
  <p>Isn't *b++ and *b=*b+1 same?</p>