C++: difference between ampersand “&” and asterisk “*” in function/method declaration?

Both do the same, but one uses references and one uses pointers.

See my answer here for a comprehensive list of all the differences.

Leave a Comment