I have a simple question.
- #include void inc_mutable(int& x) {++x;
- } void inc_pointer (int* x) {++(*x);
- } int main() {int x = 10;inc_mutable(x);<- Ainc_pointer(&x);<- Bstd::cout << x;
- }
1) Are calls A and B semantically identical?
2) Which is preferable?