Why can I do something like *x = *x+1;, but doing something like *x = *x++; doesn't seem to have any affect?
Code:
// Example program
#include <iostream>
#include <string>
using namespace std;
void doSomething(int *x, int *y)
{
    *x = *x++;
    *y = *y + 5;
}
int main()
{
    int x = 4;
    int y = 3;
    doSomething(&x, &y);
    cout << "x is now: " << x << endl; //outputs 4
    cout << "y is now: " << y << endl; //outputs 8
    return 0;
}
 
     
     
    